Fix epic transfer when transfering a project
What does this MR do and why?
Issue: #363102 (closed)
When transferring a project, we load all epics for issues in the project and re-create the epic in the new group.
To find all the required epics, we join the issues from the project. There was however a bug in this query as it would return the same epic multiple time if an epic has multiple related issues.
To fix this, we're now use a DISTINCT
on the query to only get each
epic once.
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
- Create two groups (or use existing ones)
- Create (or use an existing) project in
Group A
- Create an Epic in
Group A
- Create two issues in the project
- Go to Project > Settings > Advances > Transfer Project
- Transfer the project to
Group B
- Result:
- Before this fix: Two epics in
Group B
got created - After this fix: Only one epic in
Group B
gets created
- Before this fix: Two epics in
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.
Edited by Nicolas Dular