Skip to content

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:

  1. Creating a dedicated UpdateService for handling status changes
  2. Adding a status parameter to the close and reopen services
  3. Implementing logic to determine appropriate status based on issue transitions (open, close, duplicate)
  4. 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:

  1. closing an issue should update the status to the default closed status (Done for System defined)
  2. reopening the issue should update the status to the default open status (To do for System defined)
  3. 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:

  1. Done, Won't Do and Duplicate, it keep the issue closed or closes it
  2. To Do and In progress, it keeps the issue open or opens it.

In boards:

  1. Moving an issue from open to closed list should change the status to Done
  2. 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

Merge request reports

Loading