Add negative validation to time estimate update mutations
requested to merge gitlab-community/gitlab:md-time-tracking-graphql-mutations-validation into master
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.
Edited by Missy Davies