Project

General

Profile

Actions

Patch #212

open

Assign To limited by workflow

Added by Amedeo Amedeo about 17 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues workflow
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

First of all, thanks for this great product!

I had the problem of showing only the list of users involved in the new issue status rather than the whole list, so
I have applied this little change. Probably could have be done in a better way :)

Index: issues_controller.rb
===================================================================
--- issues_controller.rb        (revision 359)
+++ issues_controller.rb        (working copy)
@@ -105,7 +105,8 @@
         flash[:notice] = l(:notice_locking_conflict)
       end
     end    
-    @assignable_to = @project.members.find(:all, :include => :user).collect{ |m| m.user }
+    # @assignable_to = @project.members.find(:all, :include => :user).collect{ |m| m.user }
+    @assignable_to = Workflow.find(:all, :conditions => ["old_status_id = ?", @new_status]).collect {|w| w.role}.collect {|r| r.members}.flatten.collect {|m| m.user}.uniq
   end

   def destroy

Related issues

Related to Redmine - Feature #2937: Filter assignable users based on workflowNew2009-03-09

Actions
Related to Redmine - Feature #8313: Restrict Assignee List by RoleNew2011-05-06

Actions
Actions

Also available in: Atom PDF