From 4ac49e0d0685de06c78706c4f5bfe70d480400ea Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 25 Mar 2021 02:11:14 +0000 Subject: [PATCH] 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 --- lib/redmine/default_data/loader.rb | 13 ++++++++++--- 1 file 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 -- 2.39.5