summaryrefslogtreecommitdiffstats
path: root/app/controllers/trackers_controller.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-11-25 07:51:58 +0000
committerGo MAEDA <maeda@farend.jp>2020-11-25 07:51:58 +0000
commit2f43c315f36a88ca0251ff9d6ab46fa63f84839c (patch)
treeae824edc5d581391ead2eae068d51784a4820500 /app/controllers/trackers_controller.rb
parent00c751a1a6ad5ae67d93b7687b4b1ff9a8c7307e (diff)
downloadredmine-2f43c315f36a88ca0251ff9d6ab46fa63f84839c.tar.gz
redmine-2f43c315f36a88ca0251ff9d6ab46fa63f84839c.zip
Create tracker by copy (#34258).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@20492 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/trackers_controller.rb')
-rw-r--r--app/controllers/trackers_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb
index fdb5f0e37..c69721f52 100644
--- a/app/controllers/trackers_controller.rb
+++ b/app/controllers/trackers_controller.rb
@@ -36,6 +36,9 @@ class TrackersController < ApplicationController
def new
@tracker ||= Tracker.new(:default_status => IssueStatus.sorted.first)
@tracker.safe_attributes = params[:tracker]
+ if params[:copy].present? && @copy_from = Tracker.find_by_id(params[:copy])
+ @tracker.copy_from(@copy_from)
+ end
@trackers = Tracker.sorted.to_a
@projects = Project.all
end