Reduce custom status name limit from 255 to 32 characters

What does this MR do and why?

As part of the configurable work item statuses initiative, this MR reduces the custom status name limit from 255 to 32 characters to improve our ability to show truncated titles in tooltips. The limit reduction has been requested by the UX team.

Notes

  • The configurable work item statuses feature (including both system-defined and custom statuses) is currently behind a feature flag and won't be released to a broader audience (gitlab-com and gitlab.org groups) for at least a week.
  • Since the work_item_custom_statuses table is still empty in production (view Postgres.ai query), we'd like to proceed with reducing the column limit before any custom status records are created.
  • The custom status name will also be limited on the frontend via Add edit status form (!194405 - merged).

References

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. Trigger validation by attempting to create a custom status record with a name that is too long via Rails console:
namespace = Project.find_by_full_path('flightjs/flight').root_ancestor

WorkItems::Statuses::Custom::Status.create!(
  namespace: namespace,
  name: "A very long status name that will raise a validation error",
  color: "#737278",
  category: :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 Agnes Slota

Merge request reports

Loading