Fix updating group level work item labels
What does this MR do and why?
Now work items can belong directly to a group. We need to make just a few changes for updating labels to work in this scenario
How to set up and validate locally
- Enable the feature flag in Rails console
Feature.enable(:namespace_level_work_items)
- Create a group level work item with the following query at http://127.0.0.1:3000/-/graphql-explorer so you can use it in the next query
mutation { workItemCreate(input: {namespacePath: "flightjs", title: "test group level work item", workItemTypeId: "gid://gitlab/WorkItems::Type/1"}) { errors workItem { id iid } } }
- Update labels on the newly created work item
mutation { workItemUpdate(input:{id: "<id_returned_in_previous_step>", labelsWidget: {addLabelIds: ["gid://gitlab/GroupLabel/52", "gid://gitlab/GroupLabel/50"]}}) { errors workItem { id iid widgets { ... on WorkItemWidgetLabels { allowsScopedLabels labels { nodes { color id title } } } } } } }
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #426472 (closed)
Edited by Mario Celi