diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-09-03 19:54:24 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-09-03 19:54:24 +0000 |
commit | a2ce6e236c397a527deb18cc2196371855d27c41 (patch) | |
tree | 80bbf34abb631a5435b24ff35a5fa8ce13286ebb /app/controllers/context_menus_controller.rb | |
parent | c1068bf0cd32df1edf9b1b69e76e30af84692b7c (diff) | |
download | redmine-a2ce6e236c397a527deb18cc2196371855d27c41.tar.gz redmine-a2ce6e236c397a527deb18cc2196371855d27c41.zip |
Allow mass status update through context menu. #3411
NB: it cannot be done with issues from different projects, same as
other fields. This will be addressed separately, see #5332.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4055 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r-- | app/controllers/context_menus_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index 442f85b37..e437a18dc 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -6,6 +6,12 @@ class ContextMenusController < ApplicationController if (@issues.size == 1) @issue = @issues.first @allowed_statuses = @issue.new_statuses_allowed_to(User.current) + else + @allowed_statuses = @issues.map do |i| + i.new_statuses_allowed_to(User.current) + end.inject do |memo,s| + memo & s + end end projects = @issues.collect(&:project).compact.uniq @project = projects.first if projects.size == 1 |