Skip to content

Connect current statuses and custom statuses

What does this MR do and why?

As part of the configurable work item statuses initiative, this MR establishes the relationship between work item current statuses and custom statuses, enabling work items to not only be assigned system-defined but also custom status values.

This builds upon recently introduced tables and models for custom status and lifecycle.

Notes

The actual implementation of custom status-related methods will be introduced in a separate MR via Connect custom status to all abstraction methods.

References

The overview of system-defined and custom status and lifecycle classes can be found in the design doc.

Screenshot_2025-04-11_at_2.36.54_pm

Screenshots or screen recordings

backend changes only.

How to set up and validate locally

  1. Enable the work_item_status_feature_flag feature flag.

  2. Create a new work item (only tasks are supported) in the UI at the project or group level.

  3. Use the /status quick action to assign a system-defined status to the task. This will create a CurrentStatus record.

  4. Complete the rest of the steps via Rails console.

  5. Follow instructions from Introduce tables and models for custom status a... (!186050 - merged) to create a custom lifecycle and status. Ensure the custom lifecycle and statuses are created under the same namespace as the work item task.

  6. Assign a custom status to the work item's current status.

work_item = WorkItem.last

current_status = work_item.current_status

custom_status = WorkItems::Statuses::Custom::Status.last

current_status.update!(custom_status: custom_status)
  1. Verify the work item's current status.
work_item.current_status

work_item.current_status.custom_status

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 Agnes Slota

Merge request reports

Loading