Skip to content

WorkItems: Rolledup dates when adding an existing work item hierarchy

What does this MR do and why?

Describe in detail what your merge request does and why.

WorkItems: Rolledup dates when adding an existing work item hierarchy

As part of the epic, we need to ensure that when adding an existing WorkItem to the hierarchy we update all the parent WorkItems in that hierarchy with rolledup dates to use the most broad start/due dates in its hierarchy.

This is being developed behind the feature flag: work_items_rolledup_dates

Related to: #434835 (closed)

Changelog: added EE: true

FAQ

  • Why renaming the UpdateParentRolledupDatesEventHandler to UpdateRolledupDatesEventHandler?
    • the first events used/created to update the rolledup dates were always dispatched on a child of a work_item with rolledup dates. Now, I noticed that some events might be dispatched directly in the work_item with the rolledup dates (like adding existing working items as children). Since the process of updating rolledup dates goes upwards the hierarchy tree, it make sense to always start the calculation from the work_item that dispatched the event.
  • Why not just removing the UpdateParentRolledupDatesEventHandler?

Follow-up

The removal of existing children from the hierarchy has its own complexity, so I extracted it to its own MR !148191 (merged)

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

  • When adding a existing children to the work item hierarchy:

Screen_Recording_2024-03-27_at_18.08.43

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Kassio Borges

Merge request reports