Skip to content

Create epic links when work item parent links are created

What does this MR do and why?

Related to #450300 (closed) (task #457964 (closed))

Sync work item parent links with legacy epic links. This MR covers the following cases:

  • Set a WI epic as the parent of a WI epic -> call Epics::EpicLinks::CreateService within a transaction to create a relationship for the synced epics
  • Set a WI epic as the parent of a WI issue -> call EpicIssues::CreateService within a transaction to add the WI issue as a child to the legacy epic

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

Work Iten View Legacy Epic View
Screenshot_2024-04-24_at_18.38.53 Screenshot_2024-04-24_at_18.39.10

How to set up and validate locally

  1. Enable :sync_work_item_to_epic and :sync_epic_to_work_item feature flags
  2. Make sure that :make_synced_work_item_read_only is disabled
  3. Create one epic A using the URL http://gdk.test:3000/groups/GROUP_PATH/-/epics/new
  4. Create one epic B by visiting the same URL from above
  5. Create one issue C in any project
  6. Visit epic A as a work item by visiting http://gdk.test:3000/groups/GROUP_PATH/-/work_items/EPIC_A_IID and add work item B as a child epic using the hierarchy widget in the UI
  7. Using the same widget add a new issue as a child (requires an existing project in the group)
  8. Visit epic A with the legacy epic URL http://gdk.test:3000/groups/GROUP_PATH/-/epics/EPIC_A_IID and verify that epic A and the new issue are present as children
Edited by Eugenia Grieff

Merge request reports