diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-07-26 08:30:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-07-26 08:30:19 +0000 |
commit | 2bc5b60f9de7c533b33348213f6ddac37dc9cdb3 (patch) | |
tree | 803c2d2ece43283b231b59ede3636c9fc2d3828a /app/controllers/workflows_controller.rb | |
parent | fdecb2a17b450c4524856b0286c2ec27ef113ea6 (diff) | |
download | redmine-2bc5b60f9de7c533b33348213f6ddac37dc9cdb3.tar.gz redmine-2bc5b60f9de7c533b33348213f6ddac37dc9cdb3.zip |
Makes new issue initial status settable in workflow (#5816).
git-svn-id: http://svn.redmine.org/redmine/trunk@14458 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/workflows_controller.rb')
-rw-r--r-- | app/controllers/workflows_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index af8c2750b..6f8a65f9c 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -43,7 +43,9 @@ class WorkflowsController < ApplicationController end if @trackers && @roles && @statuses.any? - workflows = WorkflowTransition.where(:role_id => @roles.map(&:id), :tracker_id => @trackers.map(&:id)) + workflows = WorkflowTransition. + where(:role_id => @roles.map(&:id), :tracker_id => @trackers.map(&:id)). + preload(:old_status, :new_status) @workflows = {} @workflows['always'] = workflows.select {|w| !w.author && !w.assignee} @workflows['author'] = workflows.select {|w| w.author} |