]> source.dussan.org Git - redmine.git/commitdiff
Author should be displayed as assignable on a single issue right click menu (#7136).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 23 Jul 2011 20:02:31 +0000 (20:02 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 23 Jul 2011 20:02:31 +0000 (20:02 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6310 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/context_menus_controller.rb

index dd93724dd37fa0be1fd58ebef2828237236d48d2..1e170396d1d0e6fd718271fe25863f97223cbcdc 100644 (file)
@@ -26,8 +26,11 @@ class ContextMenusController < ApplicationController
             :delete => User.current.allowed_to?(:delete_issues, @projects)
             }
     if @project
-      @assignables = @project.assignable_users
-      @assignables << @issue.assigned_to if @issue && @issue.assigned_to && !@assignables.include?(@issue.assigned_to)
+      if @issue
+        @assignables = @issue.assignable_users
+      else
+        @assignables = @project.assignable_users
+      end
       @trackers = @project.trackers
     else
       #when multiple projects, we only keep the intersection of each set