summaryrefslogtreecommitdiffstats
path: root/lib/redmine/default_data
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-25 02:11:14 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-25 02:11:14 +0000
commit4ac49e0d0685de06c78706c4f5bfe70d480400ea (patch)
treea012c38cf9b5cc38f572f7cfa86f950edeffde50 /lib/redmine/default_data
parent319e8a2620e43ac4997bb76735f33fc12b92b46d (diff)
downloadredmine-4ac49e0d0685de06c78706c4f5bfe70d480400ea.tar.gz
redmine-4ac49e0d0685de06c78706c4f5bfe70d480400ea.zip
Set trackers in the default data as defaults for new projects (#33733).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20841 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/default_data')
-rw-r--r--lib/redmine/default_data/loader.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/redmine/default_data/loader.rb b/lib/redmine/default_data/loader.rb
index 16b289fc7..a9f5f0665 100644
--- a/lib/redmine/default_data/loader.rb
+++ b/lib/redmine/default_data/loader.rb
@@ -155,9 +155,16 @@ module Redmine
rejected = IssueStatus.create!(:name => l(:default_issue_status_rejected), :is_closed => true, :position => 6)
# Trackers
- Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => false, :position => 1)
- Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => true, :position => 2)
- Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_chlog => false, :is_in_roadmap => false, :position => 3)
+ bug = Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => false, :position => 1)
+ feature = Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => true, :position => 2)
+ support = Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_chlog => false, :is_in_roadmap => false, :position => 3)
+
+ # Set trackers as defaults for new projects
+ Setting.default_projects_tracker_ids = [
+ bug.id.to_s,
+ feature.id.to_s,
+ support.id.to_s
+ ]
if workflow
# Workflow