Skip to content

Fix epic transfer when transfering a project

Nicolas Dular requested to merge nd/fix-epic-transfer into master

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

  1. Create two groups (or use existing ones)
  2. Create (or use an existing) project in Group A
  3. Create an Epic in Group A
  4. Create two issues in the project
  5. Go to Project > Settings > Advances > Transfer Project
  6. Transfer the project to Group B
  7. Result:
    • Before this fix: Two epics in Group B got created
    • After this fix: Only one epic in Group B gets created

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Nicolas Dular

Merge request reports