Skip to content

Handle syncing alert escalation status to incident

Sean Arnold requested to merge 330281-create-issue-escalation-status into master

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
  • 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.

  1. Create an Escalation Policy, via Monitor -> Escalation Policies.
  2. Create an alert via the API (Docs here).
  3. Create an incident from the alert, by clicking the Create Incident button.
  4. 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 and escalations_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.

Related to #330281 (closed)

Edited by Sean Arnold

Merge request reports