Handle syncing alert escalation status to incident
What does this MR do and why?
As part of #330281 (closed), this creates an IncidentManagement::IssuableEscalationStatus
when an incident Issue is created.
This model is used with !74337 (merged) in order to escalate an Incident issue to the relevant on call recipients.
- In CE, we add the
IncidentManagement::IssuableEscalationStatus
without setting the Policy or Escalation time- These can then be manually added later, via the policy dropdown or a slash command.
- In EE, we copy the Policy & Escalation time data from the associated Alert (if any). If no alert exists we, we follow the behaviour in CE.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Create an Escalation Policy, via Monitor -> Escalation Policies.
- Create an alert via the API (Docs here).
- Create an incident from the alert, by clicking the
Create Incident
button. - Verify the escalation status has been created successfully on the Incident in the Rails console
Issue.incident.last.incident_management_issuable_escalation_status
-
policy_id
andescalations_started_at
should both be set.
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.
Related to #330281 (closed)
Edited by Sean Arnold