summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-06-25 14:07:15 +0000
committerAndreas Brandl <abrandl@gitlab.com>2019-06-25 14:07:15 +0000
commit04f10a152033f393f3f53b2bfcb97ec27842e7ab (patch)
tree56ee1151c1b4c9c4a411c7ddcbdf79375d9280ae
parent34df0b303eed0cee83d8c0ec6178d3c575a0b555 (diff)
parent919339e48bfbeb86c90c044a8a12e9b991e6fbd2 (diff)
downloadgitlab-ce-04f10a152033f393f3f53b2bfcb97ec27842e7ab.tar.gz
Merge branch '11586-make-create-an-issue-default-for-incident-management-ce' into 'master'
CE backport: Resolve "Make "Create an issue" default for Incident Management" See merge request gitlab-org/gitlab-ce!29747
-rw-r--r--db/migrate/20190513174947_enable_create_incident_issues_by_default.rb19
-rw-r--r--db/schema.rb6
-rw-r--r--doc/user/project/integrations/prometheus.md2
3 files changed, 23 insertions, 4 deletions
diff --git a/db/migrate/20190513174947_enable_create_incident_issues_by_default.rb b/db/migrate/20190513174947_enable_create_incident_issues_by_default.rb
new file mode 100644
index 00000000000..ecd466627fe
--- /dev/null
+++ b/db/migrate/20190513174947_enable_create_incident_issues_by_default.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class EnableCreateIncidentIssuesByDefault < ActiveRecord::Migration[5.1]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ change_default_for :create_issue, from: false, to: true
+ change_default_for :send_email, from: true, to: false
+ end
+
+ private
+
+ def change_default_for(column, from:, to:)
+ change_column_default :project_incident_management_settings,
+ column, from: from, to: to
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 44213fddd86..a94e5142627 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2503,9 +2503,9 @@ ActiveRecord::Schema.define(version: 20190620112608) do
t.index ["project_id"], name: "index_project_import_data_on_project_id", using: :btree
end
- create_table "project_incident_management_settings", primary_key: "project_id", id: :integer, default: nil, force: :cascade do |t|
- t.boolean "create_issue", default: false, null: false
- t.boolean "send_email", default: true, null: false
+ create_table "project_incident_management_settings", primary_key: "project_id", id: :serial, force: :cascade do |t|
+ t.boolean "create_issue", default: true, null: false
+ t.boolean "send_email", default: false, null: false
t.text "issue_template_key"
end
diff --git a/doc/user/project/integrations/prometheus.md b/doc/user/project/integrations/prometheus.md
index 751e8e44e60..aab7131e353 100644
--- a/doc/user/project/integrations/prometheus.md
+++ b/doc/user/project/integrations/prometheus.md
@@ -160,7 +160,7 @@ receivers:
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/4925) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.11.
-Alerts can be used to trigger actions, like open an issue automatically. To configure the actions:
+Alerts can be used to trigger actions, like open an issue automatically (enabled by default since `12.1`). To configure the actions:
1. Navigate to your project's **Settings > Operations > Incidents**.
1. Enable the option to create issues.