summaryrefslogtreecommitdiffstats
path: root/app/models/member.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-06-29 17:21:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-06-29 17:21:37 +0000
commit87bad767c686c96d4bb1d83443749302c977e1bf (patch)
tree1338e1a1e6080445d7055e0698aab122de79d4db /app/models/member.rb
parentf816d4f3784409ff505f4f88ad46e7f7fb447a96 (diff)
downloadredmine-87bad767c686c96d4bb1d83443749302c977e1bf.tar.gz
redmine-87bad767c686c96d4bb1d83443749302c977e1bf.zip
Each category can now be associated to a user, so that new issues in that category are automatically assigned to that user.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@577 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/member.rb')
-rw-r--r--app/models/member.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/member.rb b/app/models/member.rb
index 9814faa51..7b512de37 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -26,4 +26,9 @@ class Member < ActiveRecord::Base
def name
self.user.display_name
end
+
+ def before_destroy
+ # remove category based auto assignments for this member
+ project.issue_categories.update_all "assigned_to_id = NULL", ["assigned_to_id = ?", self.user.id]
+ end
end