Skip to content

[RUN AS-IF-FOSS] Add Incident SLA to new Incidents

Sean Arnold requested to merge 241663-incident-sla-logic into master

What does this MR do?

This builds on !44099 (merged), and adds an IncidcentSla to newly created incidents.

The IncidentSla model contains:

  • issue_id foreign key
  • sla_due_at timestamp, which is set on creation.

If the user has:

  • enabled the incident in their settings
  • Is on a GitLab Premium license (incident_sla)
  • The dev feature flag is enabled (incident_sla_dev)

then we will create an associated IncidentSla to the Incident (Issue with issue_type = incident).

Migration UP/DOWN:

Up

rake db:migrate:up VERSION=20201002012659
== 20201002012659 AddIncidentSlaTable: migrating ==============================
-- create_table(:incident_slas, {:id=>false})
   -> 0.0154s
== 20201002012659 AddIncidentSlaTable: migrated (0.0154s) =====================
Down
rake db:migrate:down VERSION=20201002012659
== 20201002012659 AddIncidentSlaTable: reverting ==============================
-- drop_table(:incident_slas, {:id=>false})
   -> 0.0064s
== 20201002012659 AddIncidentSlaTable: reverted (0.0099s) =====================

Screenshots

New Section
before after (future SLA) after (expired SLA)
Screenshot_2020-10-08_at_15.47.59 Screenshot_2020-10-08_at_15.45.29 Screenshot_2020-10-08_at_15.45.57
Tooltips
future expired
Screenshot_2020-10-08_at_15.45.44 Screenshot_2020-10-08_at_15.46.02
Mobile view
future SLA
Screenshot_2020-10-08_at_15.51.58

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Contributes to #241663 (closed)

Edited by Peter Leitzen

Merge request reports