Add elements to incident page to render escalation info
What does this MR do and why?
- Related issues: #330284 (closed), #330283 (closed)
- frontend will be added in separate MRs
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 betrue
for Developer+
- if present, an attribute of
-
#js-escalation-policy
is present after Status & before Milestone if:incident_escalations
is enabled, the issue is an incident, and GitLab Premium featuresoncall_schedules
&escalation_policies
are available- if present, an attribute of
canEditEscalationPolicy
should be present, and it should betrue
for Developer+
- if present, an attribute of
Screenshots
Empty elements in sidebar w/ everything enabled (in absense of frontend ) | DOM |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Prereq: developer+ user in a project w/ Premium
- Enable the feature via rails console
Feature.enable(:incident_escalations)
- Create an incident via the UI
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sarah Yasonik