Skip to content

Add elements to incident page to render escalation info

Sarah Yasonik requested to merge add-incident-escalations-initial-data into master

What does this MR do and why?

Adds elements to issue page html to render escalation status and escalation policy on incidents. Exposes permissions info for whether user can modify these values.

Also includes a small refactor to moves the :incident_escalations feature flag check from EE to CE, to make the check a more universal part of feature usage. This ensures the incident page does not contain new elements if the feature is disabled.

Excluding a changelog as this is still feature flagged.

Expected behavior:

  • #js-escalation-status is present after Assignees & before Milestone if :incident_escalations is enabled & the issue is an incident
    • if present, an attribute of data-can-edit-escalation-status should be present, and it should be true for Developer+
  • #js-escalation-policy is present after Status & before Milestone if :incident_escalations is enabled, the issue is an incident, and GitLab Premium features oncall_schedules & escalation_policies are available
    • if present, an attribute of canEditEscalationPolicy should be present, and it should be true for Developer+

Screenshots

Empty elements in sidebar w/ everything enabled (in absense of frontend ) DOM
Screen_Shot_2022-01-21_at_2.46.00_PM Screen_Shot_2022-01-21_at_2.43.05_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Prereq: developer+ user in a project w/ Premium
  2. Enable the feature via rails console
    Feature.enable(:incident_escalations)
  3. Create an incident via the UI
  4. View the DOM for the page, and see the new elements & data attributes

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