giddie / redmine_default_assign

Redmine ticket #482:Default assignment setting -- converted to a plugin and then extended.
Other
34 stars 26 forks source link

Patch so default assignee can be a group #6

Closed VictorT83 closed 11 years ago

VictorT83 commented 11 years ago

Redmine allows for groups to be set as the assignee for tasks, this plugin partially allows for the default assignee to be set as a group. The issue was that once selected It does not display the proper value.

I was able to select a group to be the default assignee for a project. However the default assignee selectbox would display blank. New tasks would be assigned to the group. So everything worked but displaying the group name. Here is a patch for this issue

--- default_assign_project_patch.original.rb    2013-05-21 12:24:23.445096187 -0500
+++ default_assign_project_patch.rb     2013-06-01 21:55:18.110203503 -0500
@@ -7,7 +7,7 @@
       unloadable

       safe_attributes :default_assignee_id
-      belongs_to :default_assignee, :class_name => "User"
+      belongs_to :default_assignee, :class_name => "Principal"
       before_save :set_default_assignee
     end
   end
giddie commented 11 years ago

Thanks; I've committed this patch :)