Skip to content

Destroy synced work item parent link

What does this MR do and why?

Related to #441255 (closed)

A follow-up to !145527 (merged) where we synced adding child issues.

When removing a child issue from an epic we also want to remove it from the synced work item, if present.

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

Screen_Recording_2024-02-27_at_16.46.56

How to set up and validate locally

  1. Feature.enable(:epic_creation_with_synced_work_item)
  2. Feature.enable(:namespace_level_work_items)
  3. Create an epic and add an issue as a child (existing or new issue)
  4. Visit the corresponding work item and verify the issue is also present as a child [*]
  5. Remove the issue on the epic page and verify that it's also remove from the work item

[*] If !145527 (merged) has not yet been merged, add the child to the work item using the console:

epic = Epic.last
issue = epic.issues.last
work_item = WorkItem.find(issue.id)
WorkItems::ParentLink.create!(work_item: work_item, parent_work_item: epic.work_item)
Edited by Eugenia Grieff

Merge request reports