Ensure consistency between states and corresponding statuses
What does this MR do and why?
Background
Following Decision #13 in the registry, we're implementing status management only for EE when the feature flag is enabled.
Changes
This MR refactors work item status management by:
- Creating a dedicated
UpdateServicefor handling status changes - Adding a
statusparameter to the close and reopen services - Implementing logic to determine appropriate status based on issue transitions (open, close, duplicate)
- Ensuring consistent mapping between states (open/closed) and their corresponding statuses
Implementation Details
- Issue close/reopen services now call the status update service after state transitions
- Status callbacks route to the appropriate service based on whether state changes are needed
- The system maintains consistent relationship between an issue's state and its specific status (to-do, in progress, done, etc.)
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
Requirments:
The work_item_status_feature_flag FF need to be enabled
The work item need to have the status widget enabled(Issues and Task should already have the widget).
When we are using state changes:
- closing an issue should update the status to the default closed status (Done for System defined)
- reopening the issue should update the status to the default open status (To do for System defined)
- Duplicating the issue should update the status to the default duplicated status (Duplicated for System defined)
When we are changing the status: For the System default, when we are changing a status to:
-
Done,Won't DoandDuplicate, it keep the issue closed or closes it -
To DoandIn progress, it keeps the issue open or opens it.
In boards:
- Moving an issue from open to closed list should change the status to
Done - Moving an issue from closed to open list should change the status to 'To Do'.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Stefanos Xanthopoulos