Fix rewriting epic in Issues MoveService
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/339514
With !76686 (merged) we introduced new validation for EpicIssue
records. When moving an issue we need to check if the updated EpicIssue
link is valid, if it isn't, don't link issue to the epic.
Because we were updating the attribute issue_id
instead of the association issue
, we were able to move issues and retain an invalid epic. Example: issue with invalid epic (ETA: the link was removed with the migration, see system notes instead)
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.