Project

General

Profile

Actions

Patch #4966

closed

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

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
Start date:
2010-03-02
Due date:
% Done:

0%

Estimated time:

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 recipient listClosedJean-Philippe Lang2010-02-24

Actions
Actions #1

Updated by Andrew Rudenko over 14 years ago

This patch is also might be applied to fix #4920

Actions #2

Updated by Jean-Philippe Lang over 14 years ago

  • Target version set to 0.9.4

Fixed in r3532. Thanks.

Actions #3

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF