summaryrefslogtreecommitdiffstats
path: root/app/controllers/context_menus_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r--app/controllers/context_menus_controller.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index 66ec35085..dc8e72609 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -35,16 +35,8 @@ class ContextMenusController < ApplicationController
:add_watchers => User.current.allowed_to?(:add_issue_watchers, @projects),
:delete => @issues.all?(&:deletable?)
}
- if @project
- if @issue
- @assignables = @issue.assignable_users
- else
- @assignables = @project.assignable_users
- end
- else
- #when multiple projects, we only keep the intersection of each set
- @assignables = @projects.map(&:assignable_users).reduce(:&)
- end
+
+ @assignables = @issues.map(&:assignable_users).reduce(:&)
@trackers = @projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&)
@versions = @projects.map {|p| p.shared_versions.open}.reduce(:&)