diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-18 15:41:32 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-18 15:41:32 +0000 |
commit | 6bf0723d0654e58bc6c8fc19759ff8fb6502a18f (patch) | |
tree | a90c2bb695ca772be91cab3fb07d79f7ea2de30d /app/controllers/workflows_controller.rb | |
parent | 6a369f28ddab41673f51c1b7a640ad6054d8e258 (diff) | |
download | redmine-6bf0723d0654e58bc6c8fc19759ff8fb6502a18f.tar.gz redmine-6bf0723d0654e58bc6c8fc19759ff8fb6502a18f.zip |
By default, only show statuses that are used by the tracker on the workflow edit view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3188 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/workflows_controller.rb')
-rw-r--r-- | app/controllers/workflows_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 6e7c58e26..fd2876769 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -42,7 +42,12 @@ class WorkflowsController < ApplicationController end @roles = Role.find(:all, :order => 'builtin, position') @trackers = Tracker.find(:all, :order => 'position') - @statuses = IssueStatus.find(:all, :order => 'position') + + @used_statuses_only = (params[:used_statuses_only] == '0' ? false : true) + if @tracker && @used_statuses_only && @tracker.issue_statuses.any? + @statuses = @tracker.issue_statuses + end + @statuses ||= IssueStatus.find(:all, :order => 'position') end def copy |