Skip to content

Fix moving an issue to a synced epic

Nicolas Dular requested to merge nd/fix-moving-issue-to-synced-epic into master

What does this MR do and why?

Issue: #443828 (closed)

In the EpicIssue validations we check if there is a correlating WorkItems::ParentLink. If there is one, we make sure that the ParentLink reflects the hierarchy we have set via the EpicIssue hierarchy. This is a measurement to not get the legacy epics and the new work item epics out of sync.

However, the validation hinders us to move an issue from one epic to another, when a synced work item epic and WorkItems::ParentLink already exists.

As a fix, we skip the validation, change the EpicLink and WorkItems::ParentLink and then validate again all within a transaction.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

  1. Enable sync epics to a work item
  2. Create an epic
  3. Create a sub-epic within that epic
  4. Create an issue within the epic
  5. Move the issue from epic to the sub-epic.
Before After
Screen_Recording_2024-02-29_at_19.02.08 Screen_Recording_2024-03-05_at_15.23.52

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Nicolas Dular

Merge request reports