Allow to update requirement status widget through GraphQL
This is needed to allow changing the status of a requirement manually. To do this
we should be able to run a GraphQL query that takes a parameter satisfied
or failed
and updates
the requirement work item accordingly. It should be something like:
mutation updateWorkItem {
workItemUpdate(input: {id: "gid://gitlab/Issue/{ISSUE_ID}", verificationStatusWidget: {status: "failed"}}) {
workItem {
widgets {
... on WorkItemWidgetVerificationStatus {
verificationStatus
}
}
}
errors
}
}
Important: A requirement status is delegated to its latest test report created. When doing a manual verification a new test report for the requirement with the desired status needs to be created. There is an example of how this was done before turning requirements into work items at: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/services/requirements_management/update_requirement_service.rb#L28 (now removed, see b06aad0b)
Edited by charlie ablett