Add ability to sort by escalation status to issues GraphQL query
What does this MR do and why?
Related issue: #332056 (closed)
This adds the ability to sort by escalation status in GraphQL, for usage from the incident list (project > Monitor > Incidents).
The escalation status feature for incidents is still in progress at the moment. I've opted not to include a feature flag check, because it's likely to be enabled very soon. This should correspondingly merge after feature flag removal, though it's not strictly blocking. !80444 (merged) Rollout has it a few lil' snags, so I've opted to add in feature flag checks in this MR. This can now be merged whenever.
How to set up and validate locally
- Enable the feature flag
Feature.enable(:incident_escalations)
- Create a new incident, and update the status via rails console
project = Project.find(<PROJECT_ID>) incident = project.issues.last ::Issues::UpdateService.new(project: project, current_user: User.first, params: { escalation_status: { status: :acknowledged } }).execute(incident)
- Open graphql explorer
/-/graphql-explorer
& run queryquery issues { project(fullPath: "root/my_project") { issues(types: INCIDENT, sort: ESCALATION_STATUS_DESC) { nodes { iid title type escalationStatus } } } }
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