diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2009-12-04 22:46:12 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2009-12-04 22:46:12 +0000 |
commit | e1781235696fe23851154ebbdc913e970d3c0f3a (patch) | |
tree | 4e8521c7522d590fc7579e0fa3b5e97d91402092 /app/models/workflow.rb | |
parent | c870a7b9ef35ed457911638b7a98e7681cfe6d3a (diff) | |
download | redmine-e1781235696fe23851154ebbdc913e970d3c0f3a.tar.gz redmine-e1781235696fe23851154ebbdc913e970d3c0f3a.zip |
Enhanced the Issue Bulk Copy feature:
* Add a Copy option to the Context menu for multiple issues.
* Added assigned to, status, start and due date options to the move/copy form.
* Allow Issue#move_to to change attributes on the moved/copied issue.
#4117
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3122 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/workflow.rb')
-rw-r--r-- | app/models/workflow.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/workflow.rb b/app/models/workflow.rb index 4168fdea0..a96abaf18 100644 --- a/app/models/workflow.rb +++ b/app/models/workflow.rb @@ -40,4 +40,15 @@ class Workflow < ActiveRecord::Base result end + + # Find potential statuses the user could be allowed to switch issues to + def self.available_statuses(project, user=User.current) + Workflow.find(:all, + :include => :new_status, + :conditions => {:role_id => user.roles_for_project(project).collect(&:id)}). + collect(&:new_status). + compact. + uniq. + sort + end end |