Skip to content

Fix updated_at mismatch when removing parent link

Nicolas Dular requested to merge nd/hierarchy-change-sync-updated-at into master

What does this MR do and why?

Issue: #463512 (closed)

Fix updated_at mismatch when removing parent link

When removing the WorkItems::ParentLink and we sync it to the epic, we got a mismatch on updated_at for the work item and the epic.

The reason is that on the work item side we remove the ParentLink record, while on the epic side we modify the parent_id on the epic record.

As a fix, we keep the existing behaviour where changing the parent from the epic side updates the updated_at on the epic and the work item, while from the work item side, we do not update the updated_at value.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

How to reproduce

Feature.enable(:namespace_level_work_items)
Feature.enable(:sync_work_item_to_epic)
Feature.disable(:make_synced_work_item_read_only)
  1. create an epic work item
  2. assign it a parent work item
  3. un-assign the parent work item

Before this MR: => The updated_at of the work_item gets updated, while updated_at of the legacy epic doesn't.

After this MR: => updated_at on work_item and the epic stays the same

Merge request reports