Skip to content

Add escalation policy dropdown to incidents sidebar

Sarah Yasonik requested to merge sy-add-escalation-dropdown-menu into master

What does this MR do and why?

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.
    • GitLab Premium+: Escalation policy widget should be present in the sidebar.
  • 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

Narrow sidebar - policy empty w/ hover Narrow sidebar - policy populated w/ hover Wide sidebar - policy empty (plus time tracking for regression check) Listing policies in dropdown Searching policies Wide sidebar - policy populated Hover state of policy w/ link Selected policy in dropdown With alert
Screen_Shot_2022-02-04_at_3.39.30_PM Screen_Shot_2022-02-04_at_3.39.59_PM Screen_Shot_2022-02-02_at_8.08.55_PM Screen_Shot_2022-02-02_at_8.12.36_PM Screen_Shot_2022-02-02_at_8.12.52_PM Screen_Shot_2022-02-02_at_8.13.03_PM Screen_Shot_2022-02-02_at_8.13.39_PM Screen_Shot_2022-02-02_at_8.13.56_PM Screen_Shot_2022-02-03_at_8.41.45_PM

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
Screen_Shot_2022-02-04_at_3.43.18_PM Screen_Shot_2022-02-02_at_8.15.16_PM Screen_Shot_2022-02-02_at_8.15.37_PM Screen_Shot_2022-02-02_at_8.15.48_PM

CE & alerts

Without alert With alert Logged out Logged out with alert
Screen_Shot_2022-02-03_at_7.37.10_PM Screen_Shot_2022-02-03_at_7.38.29_PM Screen_Shot_2022-02-03_at_7.39.09_PM Screen_Shot_2022-02-03_at_7.39.30_PM

Disabled states

Incident with disabled flag Issue (with enabled flag)
Screen_Shot_2022-02-04_at_12.03.00_PM Screen_Shot_2022-02-04_at_11.58.52_AM

Dark mode

Escalation policy help menu Time tracking help menu
Screen_Shot_2022-02-11_at_9.00.56_PM Screen_Shot_2022-02-11_at_10.57.15_AM

How to set up and validate locally

GitLab Core

  1. Enable the feature flag
    Feature.enable(:incident_escalations)
  2. Open a project, create an incident (/-/issues/new & select incident for issue type)
  3. See the status placeholder and no escalation policy section or placeholder section

GitLab Premium - help menu

  1. Navigate to Monitor > Escalation Policies & delete it if there's one there
  2. Create an incident (/-/issues/new & select incident for issue type)
  3. See the info icon & help menu in the Escalation policy widget

GitLab Premium - policy selection

  1. Navigate to Monitor > Escalation Policies & create an escalation policy
  2. Create an incident (/-/issues/new & select incident for issue type)
  3. See the Escalation policy widget; policy selection, search, and deselection should all work
  4. System notes corresponding to the triggered escalation policy should appear on the incident

With alerts

  1. Navigate to Settings > Monitor > Alerts > Current integrations
  2. Create & enable a new HTTP Endpoint alert integration if none exist
  3. For an existing integration, click Screen_Shot_2022-02-03_at_6.49.45_PM > Send test alert to trigger a test with a sample payload, like this one:
    • {"title":"Triggering a test alert to associate with an incident"}
  4. Navigate to Monitor > Alerts to find & open the detail view of the new of alert
  5. Click Create incident or View incident (whichever is fine; just depends on your incident-creation settings)
  6. 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.

Edited by Sarah Yasonik

Merge request reports

Loading