Create work item with iteration
What does this MR do and why?
This MR adds the ability to assign an iteration to a work item on creation via GraphQL mutation workItemCreate
.
The change allows us to reduce the complexity on the frontend because we can avoid chaining mutations workItemCreate
and workItemUpdate
(#367456 (comment 1098107478).)
How to set up and validate locally
- Prepare an iteration. Visit any group and navigate to
Issues
->Iterations
in the left sidebar.- Create a new iterations cadence by clicking
New iteration cadence
.- For simplicity, uncheck
Enable automatic scheduling
- For simplicity, uncheck
- To the created iterations cadence, add an iteration.
- Grab the id of the created iteration by running
gdk psql -c "SELECT id FROM sprints ORDER BY id DESC LIMIT 1;"
in your terminal.
- Create a new iterations cadence by clicking
video walkthrough
Sample query
mutation myMutation {
workItemCreate(input: {
projectPath: "gitlab-org/gitlab-test"
workItemTypeId: "gid://gitlab/WorkItems::Type/1" # corresponds to Issue type
title: "some work item"
iterationWidget: {
iterationId: "gid://gitlab/Iteration/4" # you might try out `null` and other values.
}
}) {
errors
workItem {
id
title
widgets {
type
... on WorkItemWidgetIteration {
iteration {
id
}
}
}
}
}
}
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 #367456 (closed)
Merge request reports
Activity
changed milestone to %15.6
assigned to @euko
removed missed:15.5 label
removed missed-deliverable label
removed frontend label
changed milestone to %15.8
removed Deliverable label
removed workflowverification label
2 Warnings bc0043d9: The commit subject must contain at least 3 words. For more information, take a look at our Commit message guidelines. b1909bfb: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 2 Messages CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/api/graphql/reference/index.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Kassio Borges (
@kassio
) (UTC+0, same timezone as@euko
)Terri Chu (
@terrichu
) (UTC-5, 5 hours behind@euko
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
- Resolved by Terri Chu
Hi @john-mason can you please review?
added 413 commits
-
d689ae51...98b098b2 - 412 commits from branch
master
- affecad8 - Allow work item creation with iteration
-
d689ae51...98b098b2 - 412 commits from branch
- Resolved by Terri Chu
- Resolved by Terri Chu
added 1199 commits
-
affecad8...dcdaae4e - 1198 commits from branch
master
- ba55d403 - Allow work item creation with iteration
-
affecad8...dcdaae4e - 1198 commits from branch
- Resolved by euko
- Resolved by euko
- Resolved by euko
added 2 commits
added 483 commits
-
46f94a8d...34b74c83 - 479 commits from branch
master
- 7f530054 - Allow work item creation with iteration
- e300b119 - Create shared examples
- 2c1819a5 - Update feature category
- 4261c402 - Fix typos
Toggle commit list-
46f94a8d...34b74c83 - 479 commits from branch
- Resolved by euko
Hey @euko
Thank you for working this Just wanted to confirm that after this merge , the workItemUpdate with iteration with an iteration will still work like associating it for the first time , right ?I am thinking in terms of backward compatibility and that should I be doing any frontend changes in the same MR not to break the iteration feature.
Thank you !
requested review from @seanarnold and removed review request for @john-mason
@john-mason
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.
For more info, please refer to the following links:
requested review from @terrichu and removed review request for @seanarnold
- Resolved by Terri Chu
- Resolved by euko
- Resolved by euko
removed review request for @terrichu
added 594 commits
-
4261c402...d1332794 - 590 commits from branch
master
- b1909bfb - Allow work item creation with iteration
- a0a45104 - Create shared examples
- 9194386b - Update feature category
- bc0043d9 - Fix typos
Toggle commit list-
4261c402...d1332794 - 590 commits from branch
added Technical Writing label
requested review from @msedlakjakubowski
requested review from @terrichu
changed milestone to %15.7