Migrate test reports to belong to work items
On #342496 (closed) we did create associated issues to all requirements with a background migration. It is part of a plan to deprecate old requirement objects.
We can now also migrate RequirementsManagement::TestReport to belong to issues(work items) instead of requirements with the following steps:
- Remove
requirements_test_reports_requirement_id_xor_issue_idconstraint from database 1 - Add callback to
RequirementsManagement::TestReportmodel to populateissue_idwith requirement associated issue id 1 - Create a background migration to populate old records
issue_idcolumn with requirement associated issue id 3 - Change old code to use the new requirement associated issue on models, services, API etc. 2
After Requirement reference (on TestReport model) gets fully deprecated
- Mark old column
requirement_idto be ignored 1 - Remove
requirement_idcolumn 1
Edited by Felipe Cardozo