Add WorkItemTypeUpdate GraphQL mutation
What does this MR do and why?
Introduce a new GraphQL mutation called WorkItemTypeUpdate for work item type management that establishes the foundation for updating work item type attributes including name, icon name, and archiving functionality.
Current implementation:
- Validate
work_item_configurable_typesfeature flag is enabled - Enforce container restrictions (root group or organization level)
- Use the current organization context when
full_pathof the root group is not provided - Return existing work item type without modifications
Additional changes:
- Add support for organizations as resource parents in work item type licensing checks. Organizations use
License.feature_available?directly since they don't implementlicensed_feature_available?method, enabling proper functionality when nofull_pathis provided and the system defaults tocurrent_organization.
Follow-up implementation:
- Due to blocker MRs, the mutation accepts update arguments (
name,icon_name,archive) but does not yet perform actual updates. - In a follow-up MR (after !219133 (merged) is merged), when a system-defined work item type is provided, the mutation will create a custom work item type with the updated attributes.
- In a follow-up MR (after !221664 (merged) is merged), authorization will be added using
update_work_item_permissioncheck which validates licensed features and ensures the user has root maintainer+ role.
Notes
This MR reinstates the changes for the updateWorkItemType mutation from the original MR (!222851 (merged)), which were reverted as part of the rollback (!223401 (merged)) to fix a broken master.
Shortly after the updateWorkItemType MR was merged, another MR (!219133 (merged)) introducing a feature flag to switch from legacy DB work item types to system-defined work item types was also merged, which caused the specs to fail.
The mutation itself had already been reviewed and approved by @daniyalAD and @msaleiko. The failures were caused by the concurrent switch to system-defined work item types, not by the update mutation logic. Reinstating these changes will unblock the frontend and dependent MRs.
References
Screenshots or screen recordings
With a full_path
|
|
Without a full_path
|
|
| With FF disabled |
|
| With invalid ID |
|
How to set up and validate locally
- Run the following query with
work_item_configurable_typesfeature flag enabled and disabled. - When the feature flag is enabled, the mutation should return an existing work item type without any modifications.
Click to expand
mutation UpdateWorkItemType($input: WorkItemTypeUpdateInput!) {
workItemTypeUpdate(input: $input) {
workItemType {
id
name
iconName
}
errors
}
}
{
"input": {
"id": "gid://gitlab/WorkItems::Type/1",
"fullPath": "root-group-name",
"name": "Updated Name",
"iconName": "updated-icon-name",
"archive": false
}
}
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.



