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_id
constraint from database 1 - Add callback to
RequirementsManagement::TestReport
model to populateissue_id
with requirement associated issue id 1 - Create a background migration to populate old records
issue_id
column 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_id
to be ignored 1 - Remove
requirement_id
column 1
Edited by Felipe Cardozo