Adds name argument to update lifecycle mutation
What does this MR do and why?
This change adds the ability to update the name of work item lifecycles through a GraphQL API. Previously, users could only modify the statuses within a lifecycle, but now they can also rename the lifecycle itself. The update includes adding a new "name" parameter to the API documentation and mutation, modifying the backend service to handle name updates, and adding comprehensive tests to ensure the feature works correctly both when creating new lifecycles and updating existing ones.
References
- Rename lifecycle's name (#557003 - closed)
- BE: Rename lifecycle's name (#557006 - closed)
- FE: Rename lifecycle's name (#557007 - closed)
Screenshots or screen recordings
How to set up and validate locally
-
Set up a top level namespace with custom status. Go to the group in settings select
Issuesand thenedit statusesand add a status. This will convert statuses to custom statuses. Or create a lifecycle with factory bot:namespace = Group.find(98) # Statuses will have random names FactoryBot.create(:work_item_custom_lifecycle, namespace: namespace) -
Note the ID of the lifecycle somewhere, either from the GraphQL query or the console.
-
In the GraphQL explorer, send the following mutation with variables. Replace variables with your namespace path and lifecycle ID:
mutation LifecycleUpdate($input: LifecycleUpdateInput!) {
lifecycleUpdate(input: $input) {
lifecycle {
id
name
__typename
}
errors
__typename
}
}
{
"input": {
"namespacePath": "jashkenas",
"id": "gid://gitlab/WorkItems::Statuses::Custom::Lifecycle/2",
"name": "Super lifecycle"
}
}
You can also combine that with other arguments like statuses in the same mutation.
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.
