Skip to content

Escalate manually created incidents according to an escalation policy

Motivation

This issue represents the meat of escalating manually created incidents. For the completion of this issue, we should have the logic in place such that a developer could trigger an escalation for an incident in the rails console, and the appropriate notifications would get sent out for each escalation rule automatically.

Scope

  • Automatically associate manually created incidents with a IssuableEscalationStatus (being done in #330284 (closed) and #330282 (closed)).
    • Changing the issue type to incident should create a new IssuableEscalationStatus
    • Existing manually created incidents should have a status available (at least when it is accessed)
  • Add new email for notifications about manually created incidents
  • Configure IncidentManagement::IssuableEscalations to escalate per approach in #323139 (closed).
  • Handle user actions which would affect paging or status
    • When the issue type is changed from incident to another type, remove the associated IncidentManagement::PendingEscalations::Issue records. Leave the IssuableEscalationStatus unchanged, as it will simply be ignored.
    • When the issue is moved to a different project, remove the associated IncidentManagement::PendingEscalations::Issue records and existing IssuableEscalationStatus. Create a new IssuableEscalationStatus and set the IssuableEscalationStatus#status to Triggered.

Architecture

Data flow should roughly match #323139 (closed).

UX

Email to users when paged:

An incident has been triggered in [group/project].

View incident details

Title: [Insert title here]

Description: [Insert description here]

Escalation policy: [Insert escalation policy, if present]

Metric: [Insert metric, if available]*

[Metric could be a string or a link, up to the discretion of the engineer implementing this issue. Longer-term, we'll likely include a png of the metric but that's out of scope for the first iteration.]

Edited by Sean Arnold