Sync work item rolledup dates widget updates with epics
What does this MR do and why?
Sync epic date attributes when a work item rolledup dates widget is updated using GraphQL or other means.
Updates RolledupDates::HierarchyUpdateService
to sync legacy epic attributes
even if work item dates are fixed. This service is called through a subscription
on event store whenever a work item rolled up dates is updated or created.
Part of #450302 (closed)
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.
How to set up and validate locally
Prepare
- Enable feature flag
work_items_rolledup_dates
- Enable feature flag
sync_epic_to_work_item
- Enable feature flag
sync_work_item_to_epic
-
Disable feature flag
make_synced_work_item_read_only
Test Steps
- Create one epic visiting the URL http://localhost/groups/GROUP_PATH/-/epics/new or GraphQL mutation
- Take the epic synced work item global id, Rails console can be used with
Epic.last.work_item.to_global_id.to_s
- Go to GraphQL explorer
http://gdk.test:3000/-/graphql-explorer
and execute the following mutation:
mutation UpdateWorkItem {
workItemUpdate(input: { id: "gid://gitlab/WorkItem/GLOBAL_ID", rolledupDatesWidget: { startDateFixed: "2024-01-01", startDateIsFixed: true } } ) {
workItem {
title
description
widgets {
... on WorkItemWidgetRolledupDates {
startDate
startDateFixed
startDateIsFixed
}
}
}
}
}
- Visit the work item legacy epic using the URL http://localhost/groups/GROUP_PATH/-/epics/EPIC_IID
The dates parameter on legacy epic should be the same as the ones returned by the mutation.
Edited by Felipe Artur