Patch #4966

Defect #4671 No Email Notification on New File Added to Redmine

Added by Andrew Rudenko over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-03-02
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:0.9.4

Description

if submit any changes to the issues, we can see in production.log the message like this:

Sending email notification to: name1.surname1@email.domain.com, name2.surname2@email.domain.com, name3.surname3@email.domain.com

but if we add a new document or upload a file, we can see another recipients list:

Sending email notification to: Name1 Surname1, Name2 Surname2, Name3 Surname3

and the notification is not received in the last case.


Index: app/models/mailer.rb
===================================================================
--- app/models/mailer.rb        (revision 3521)
+++ app/models/mailer.rb        (working copy)
@@ -114,11 +114,11 @@
     when 'Project'
       added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container)
       added_to = "#{l(:label_project)}: #{container}" 
-      recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}
+      recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect  {|m| m.mail}
     when 'Version'
       added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container.project_id)
       added_to = "#{l(:label_version)}: #{container.name}" 
-      recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}
+      recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|m| m.mail}
     when 'Document'
       added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id)
       added_to = "#{l(:label_document)}: #{container.title}" 

Related issues

Related to Redmine - Defect #4920: Email notifications on file upload sent to empty recipien... Closed 2010-02-24

Associated revisions

Revision 3532
Added by Jean-Philippe Lang over 7 years ago

Fixed: no email notification on new project/version file added (#4966).

History

#1 Updated by Andrew Rudenko over 7 years ago

This patch is also might be applied to fix #4920

#2 Updated by Jean-Philippe Lang over 7 years ago

  • Target version set to 0.9.4

Fixed in r3532. Thanks.

#3 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF