Skip to content

Add status widget definition to issue work item type

What does this MR do and why?

As part of the configurable work item statuses initiative, this MR adds status widget definition to issue and epic work item types.

Contributes to BE: Add status widget to issues (#537181 - closed)

Notes

As per our decision registry, expanding support to epics won't be included in the current Iteration 2, but will be part of Iteration 3 (Fast follow).

References

  1. BE: Add status widget to issues (#537181 - closed)

Screenshots or screen recordings

I was able to query group-level and project-level work items and the status widget for tasks and issues.

View screenshots

Screenshot_2025-05-15_at_4.41.21_pm

Screenshot_2025-05-15_at_4.43.55_pm

Also quick action works for issues:

Screenshot_2025-05-15_at_4.28.51_pm

How to set up and validate locally

  1. Ensure you're on EE
  2. Enable the feature flag work_item_status_feature_flag in the console Feature:enable(:work_item_status_feature_flag) or via http://127.0.0.1:3000/rails/features
  3. Create an issue and task at the project and group level and try to execute the quick action /status to do on them. It should work and a system note should be created
  4. Open the GraphQL Explorer http://127.0.0.1:3000/-/graphql-explorer
  5. Query work items of those types in the GraphQL explorer and verify the responses
Click to expand

Adjust fullPath to fetch group-level issue and tasks.

query workItems {
  workspace: group(fullPath: "flightjs") {
    id
    workItems(first: 5) {
      nodes {
        id
        iid
        title
        workItemType {
          name
        }
        widgets(onlyTypes: [STATUS]) {
          type
          ... on WorkItemWidgetStatus {
            status {
              id
              name
              iconName
              color
              position
            }
          }
        }
      }
    }
  }
}

Adjust fullPath to fetch project-level issue and tasks.

query workItems {
  workspace: project(fullPath: "flightjs/Flight") {
    id
    workItems(first: 5) {
      nodes {
        id
        iid
        title
        workItemType {
          name
        }
        widgets(onlyTypes: [STATUS]) {
          type
          ... on WorkItemWidgetStatus {
            status {
              id
              name
              iconName
              color
              position
            }
          }
        }
      }
    }
  }
}

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