Add escalation policy dropdown to incidents sidebar
What does this MR do and why?
- Related issue: #330284 (closed)
- Related MR: !66165 (merged)
This MR adds an escalation policy dropdown to incident issues. This will be used in conjunction with a status field and escalation policies to let users to escalate incidents to their on-call teams.
Expected behavior:
- Tiering
-
GitLab Core: Escalation policy dropdown should not be available.
- Placeholder for
status
dropdown should still be present. Escalation policy dropdown will never be available when status is not after !66165 (merged) merges.
- Placeholder for
- GitLab Premium+: Escalation policy widget should be present in the sidebar.
-
GitLab Core: Escalation policy dropdown should not be available.
- Permissions
- Developer+ should be able to edit the escalation policy. Others should not see the Edit button.
- Anyone who has permission to view the issue should be able to see the field in the sidebar
- Alert interactions
- Incidents without an associated alert should show the Edit button
- Incidents associated with an alert should not have an Edit button.
- Existing incidents associated with an alert will show an empty link to the escalation policy.
- New incidents created from alerts will show the link to the policy used for the alert.
- Help menu
- If there are no escalation policies created in the project, the help menu should be available.
- If there are escalation policies created, the escalation policy widget should be available.
- Caveat: Only one escalation policy is currently allowed per project. The plan is to support multiple policies in future.
- Resolving/closing the alert/incident
- Any escalation policy associated with the incident will stay associated with the incident, regardless of status/state changes
Screenshots or screen recordings
With escalation policies in project
Without escalation policies in project
Narrow sidebar - policy empty | Wide sidebar - help state collapsed | Help state expanded (plus time-tracking for consistency check) | Hover state of Learn More text |
---|---|---|---|
CE & alerts
Without alert | With alert | Logged out | Logged out with alert |
---|---|---|---|
Disabled states
Incident with disabled flag | Issue (with enabled flag) |
---|---|
Dark mode
Escalation policy help menu | Time tracking help menu |
---|---|
How to set up and validate locally
GitLab Core
- Enable the feature flag
Feature.enable(:incident_escalations)
- Open a project, create an incident (
/-/issues/new
& selectincident
for issue type) - See the status placeholder and no escalation policy section or placeholder section
GitLab Premium - help menu
- Navigate to
Monitor > Escalation Policies
& delete it if there's one there - Create an incident (
/-/issues/new
& select incident for issue type) - See the info icon & help menu in the
Escalation policy
widget
GitLab Premium - policy selection
- Navigate to
Monitor > Escalation Policies
& create an escalation policy - Create an incident (
/-/issues/new
& select incident for issue type) - See the
Escalation policy
widget; policy selection, search, and deselection should all work - System notes corresponding to the triggered escalation policy should appear on the incident
With alerts
- Navigate to
Settings > Monitor > Alerts > Current integrations
- Create & enable a new
HTTP Endpoint
alert integration if none exist - For an existing integration, click
> Send test alert
to trigger a test with a sample payload, like this one:{"title":"Triggering a test alert to associate with an incident"}
- Navigate to
Monitor > Alerts
to find & open the detail view of the new of alert - Click
Create incident
orView incident
(whichever is fine; just depends on your incident-creation settings) - See escalation policy dropdown in the sidebar, with the
Edit
button absent
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