Graphql: Allow to admin value stream stages and project_ids_filter
What does this MR do and why?
Introduces arguments to create and update mutations which allows
managing value streams stages and project_ids_filter
setting.
For now it is only possible to create/update these properties, on another MR these attributes will be introduced to ValueStreamType
.
related to #410340 (closed)
How to set up and validate locally
- Make sure you have an Ultimate tier license
- Get a project or a group path full path, for example
gitlab-org/gitlab
- Create a value stream with stages and project_ids_filter using the following mutation:
mutation createValueStream {
valueStreamCreate(input: {
namespacePath: GROUP_OR_PROJECT_PATH,
name: "Test Stream",
setting: { projectIdsFilter: [ANY_PROJECT_GLOBAL_ID] },
stages: [{ name: "code", custom:false }, { name: "custom", custom: true, startEventIdentifier:ISSUE_CREATED, endEventIdentifier: ISSUE_CLOSED }]
}) {
valueStream {
id
name
}
errors
}
}
- Visit the group or project value stream and check if was created with the correct stages
- We can now use the global id of the value stream created on step 3 to test the update mutation:
mutation updateValueStream {
valueStreamUpdate(input: {
id: VALUE_STREAM_GLOBAL_ID,
setting: { projectIdsFilter: [ANY_PROJECT_GLOBAL_ID]},
stages: [ {name: "plan", custom: false}, { name: "test", custom: false } ]
}) {
valueStream {
id
name
}
errors
}
}
- Visit the value stream page and check if it has the correct stages. For now,
project_ids_filter
can only be verified on the rails console usingAnalytics::CycleAnalytics::ValueStream.last.setting.project_ids_filter
.
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.
Edited by Felipe Cardozo