More flexible mail notifications settings at user level. A user has now 3 options:

* notification on any event on all his projects
* notification on any event on selected projects only (if the user belongs to more than 1 project)
* notification only for things that he watches or he is involded in (eg. issues that he watches or he is author or assignee)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@855 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-10-20 12:47:05 +00:00
parent eacd050630
commit 90d33c3e51
30 changed files with 254 additions and 93 deletions
+5
View File
@@ -118,6 +118,11 @@ class Project < ActiveRecord::Base
members.select {|m| m.role.assignable?}.collect {|m| m.user}
end
# Returns the mail adresses of users that should be always notified on project events
def recipients
members.select {|m| m.mail_notification? || m.user.mail_notification?}.collect {|m| m.user.mail}
end
# Returns an array of all custom fields enabled for project issues
# (explictly associated custom fields and custom fields enabled for all projects)
def custom_fields_for_issues(tracker)