Add escalation status field and mutation for incidents
What does this MR do and why?
- Related issues: #330283 (closed)
- Dependent on: !76819 (merged)
Exposes a field for the escalation/paging status of incidents in GraphQL. This is intended to be used from the incident list & incident detail view.
!76987 (merged) merged before this one, but some of the feedback during review could be applied to both. So this MR includes some bonus changes to keep these fields consistent with each other.
Sample inputs/outputs
Fetch
query issues {
project(fullPath: "root/autodevops") {
issues(types: INCIDENT) {
nodes {
iid
title
type
escalationStatus
}
}
}
}
{
"data": {
"project": {
"issues": {
"nodes": [
{
"iid": "194",
"title": "trying again on new alert - queue another",
"type": "INCIDENT",
"escalationStatus": "TRIGGERED"
},
{
"iid": "193",
"title": "trying again on new alert - queue another",
"type": "INCIDENT",
"escalationStatus": null
},
{
"iid": "192",
"title": "trying again on new alert - queue another",
"type": "INCIDENT",
"escalationStatus": "IGNORED"
}
]
}
}
}
}
Update
mutation SetEscalationStatus($update: IssueSetEscalationStatusInput!) {
issueSetEscalationStatus(input: $update) {
issue {
iid
title
type
escalationStatus
}
}
}
Setting the status
{
"update": {
"projectPath": "root/autodevops",
"iid": "194",
"status": "ACKNOWLEDGED"
}
}
{
"data": {
"issueSetEscalationStatus": {
"issue": {
"iid": "194",
"title": "trying again on new alert - queue another",
"type": "INCIDENT",
"escalationStatus": "ACKNOWLEDGED"
}
}
}
}
How to set up and validate locally
- Follow the steps in !76819 (merged) add an
IncidentManagement::IssuableEscalationStatus
association to your incident - Open
/-/graphql-explorer
in your local env to run graphql queries/mutations like the samples above
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 Sarah Yasonik