Skip to content

Sync opening and closing of epics to work item

Nicolas Dular requested to merge nd/sync-open-close-to-work-item into master

What does this MR do and why?

Part of #434530 (closed)

As part of our migration of moving Epics to Work Items, we also need to sync the opening and closing of epics to the work item.

If a work item exists for an epic, we now sync the state for open and close.

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

  1. Enable feature flag epic_creation_with_synced_work_item
  2. Go to a group -> create an epic
  3. E.g. the epic is on the URL http://gdk.test:3000/groups/flightjs/-/epics/44, then open another tab with the synced work item of the epic: http://gdk.test:3000/groups/flightjs/-/work_items/44.
  4. Now close the original epic and afterwards refresh the work item page. It should be closed as well.
  5. Note: We explicitly don't sync the system notes of the epic.
  6. Note: If you see an error when closing an epic - this is not related to this MR but a general error we have on the FE with closing/reopening epics. You can reproduce it also without my changes.

You can also check the status in the rails console:

epic = Epic.find(YOUR_EPIC_ID)
work_item = epic.work_item

epic.status 
work_item.status

epic.closed_by
work_item.closed_by

epic.closed_at
work_item.closed_at
Edited by Nicolas Dular

Merge request reports

Loading