Commit e1ef9a5c authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

fixed: no recipient if one of the members of the project has disabled mail notifications

git-svn-id: http://redmine.rubyforge.org/svn/trunk@145 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent f3babef5
......@@ -21,7 +21,7 @@ class Mailer < ActionMailer::Base
def issue_add(issue)
# Sends to all project members
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
@from = $RDM_MAIL_FROM
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
@body['issue'] = issue
......@@ -30,7 +30,7 @@ class Mailer < ActionMailer::Base
def issue_edit(journal)
# Sends to all project members
issue = journal.journalized
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
@from = $RDM_MAIL_FROM
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
@body['issue'] = issue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment