Added the ability to copy an existing workflow when creating a new tracker.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@399 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-04-02 17:45:21 +00:00
parent 0a82489ddc
commit bd8de9a6f8
9 changed files with 17 additions and 0 deletions
+7
View File
@@ -35,9 +35,16 @@ class TrackersController < ApplicationController
def new
@tracker = Tracker.new(params[:tracker])
if request.post? and @tracker.save
# workflow copy
if params[:copy_workflow_from] && (copy_from = Tracker.find_by_id(params[:copy_workflow_from]))
copy_from.workflows.each do |w|
@tracker.workflows << w.clone
end
end
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list'
end
@trackers = Tracker.find :all
end
def edit