Skip to content

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:

  1. Remove requirements_test_reports_requirement_id_xor_issue_id constraint from database 1
  2. Add callback to RequirementsManagement::TestReport model to populate issue_id with requirement associated issue id 1
  3. Create a background migration to populate old records issue_id column with requirement associated issue id 3
  4. 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

  1. Mark old column requirement_id to be ignored 1
  2. Remove requirement_id column 1
Edited by Felipe Cardozo