Add negative validation to time estimate update mutations
What does this MR do and why?
For #390579 (closed)
Fixes the issue and merge request update mutations to validate the time estimate is not negative and return an error if it is.
Screenshots or screen recordings
updateIssue
updateMergeRequest
How to set up and validate locally
- Run gdk/gitpod server
- Visit
http://127.0.0.1:3000/-/graphql-explorer
- Run timeEstimate update mutation for issue, try a negative timeEstimate and ensure error message is returned and estimate is unchanged
mutation {
updateIssue(
input: {
projectPath: "twitter/Typeahead.Js",
iid: "40",
timeEstimate: "-1h"
}
) {
issue {
id
timeEstimate
}
errors
}
}
- Run timeEstimate update mutation for merge request, try a negative timeEstimate and ensure error message is returned and estimate is unchanged
mutation {
mergeRequestUpdate(input: {
iid: "5",
projectPath: "twitter/Typeahead.Js"
timeEstimate: "-2h"
}) {
mergeRequest {
id
timeEstimate
}
}
}
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.
Merge request reports
Activity
Hey @missy-davies!
Thank you for your contribution to GitLab. Please refer to the contribution documentation for an overview of the process.
When you're ready for a first review, post
@gitlab-bot ready
. If you know a relevant reviewer(s) (for example, someone that was involved in a related issue), you can also assign them directly with@gitlab-bot ready @user1 @user2
.At any time, if you need help, feel free to post
@gitlab-bot help
or initiate a mentor session on Discord. Read more on how to get help.You can comment
@gitlab-bot label <label1> <label2>
to add labels to your MR. Please see the list of allowed labels in thelabel
command documentation.This message was generated automatically. You're welcome to improve it.
added Community contribution workflowin dev labels
assigned to @missy-davies
This merge request will be counted as part of the running Hackathon!
Check out the Hackathon page for more information!
This message was generated automatically. You're welcome to improve it.
added Hackathon label
added linked-issue label
1 Warning featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
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 Ross Byrne (
@robyrne
) (UTC+1)Małgorzata Ksionek (
@mksionek
) (UTC+2)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
DangerEdited by Ghost User@gitlab-bot label backend, typebug
added 1 commit
- f591b152 - Add negative validation to estimate mutations
- Resolved by Missy Davies
@gitlab-bot ready @zillemarco
Another piece of the puzzle for you to look at! 🧩
added workflowready for review label and removed workflowin dev label
requested review from @zillemarco
@zillemarco
, this Community contribution is ready for review.- Do you have capacity and domain expertise to review this? We are mindful of your time, so if you are not able to take this on, please re-assign to one or more other reviewers.
- Add the workflowin dev label if the merge request needs action from the author.
This message was generated automatically. You're welcome to improve it.
added 1 commit
- dd6e512c - Add negative validation to estimate mutations