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
This commit is contained in:
Jean-Philippe Lang
2009-12-18 15:41:32 +00:00
parent 6a369f28dd
commit 6bf0723d06
40 changed files with 114 additions and 9 deletions

View File

@@ -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