Adds mock implementation of missing lifecycle mutations
What does this MR do and why?
This MR adds a mock implementation for the following mutations:
- delete lifecycle mutation
- attach work item type mutation with status mapping
- (update mutation) with status mapping
The mock implementation is needed for the 18.4 release to prevent multi-version-compatibility issues during roll out of SM updates.
The implementation performs no action and doesn't have any validation apart from required fields validation and namespace authorization.
References
- Change lifecycle (#557009 - closed)
- Delete lifecycle (#557013 - closed)
- BE: Change lifecycle (#557011 - closed)
- BE: Delete lifecycle (#557014 - closed)
Screenshots or screen recordings
LifecycleDelete
LifecycleAttachWorkItemType
How to set up and validate locally
LifecycleDelete
Click to expand
mutation ($input: LifecycleDeleteInput!) {
lifecycleDelete(input: $input) {
errors
lifecycle {
id
name
}
}
}
{
"input": {
"namespacePath": "whocka",
"id": "gid://gitlab/WorkItems::Statuses::Custom::Lifecycle/14"
}
}
LifecycleAttachWorkItemType
Click to expand
mutation ($input: LifecycleAttachWorkItemTypeInput!) {
lifecycleAttachWorkItemType(input: $input) {
lifecycle {
id
name
}
errors
}
}
In the real word using system defined data wouldn't make sense, but it's sufficient for this mock implementation.
{
"input": {
"namespacePath": "whocka",
"workItemTypeId": "gid://gitlab/WorkItems::Type/1",
"lifecycleId": "gid://gitlab/WorkItems::Statuses::SystemDefined::Lifecycle/1",
"statusMappings": [
{
"oldStatusId": "gid://gitlab/WorkItems::Statuses::SystemDefined::Status/1",
"newStatusId": "gid://gitlab/WorkItems::Statuses::SystemDefined::Status/2"
}
]
}
}
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 Marc Saleiko

