[RUN AS-IF-FOSS] Add Incident SLA to new Incidents
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
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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