Defect #4700

Adding news does not send notification to all project members

Added by Kamil . almost 8 years ago. Updated over 4 years ago.

Status:ClosedStart date:2010-01-31
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Email notifications
Target version:2.3.0
Resolution:Fixed Affected version:

Description

I have read this: http://www.redmine.org/wiki/redmine/FAQ#Email-notifications-are-not-working and test e-mail is being sent properly.
Notification is also sent when I add a new issue but not when I add a news.
Of course I have set the option "News added" in "Administration -> Settings -> Email notifications"

kind regards


Related issues

Related to Redmine - Feature #4532: Ability to send e-mail notification to every project memb... Closed 2010-01-07
Related to Redmine - Feature #2549: Enable the watching of news Closed 2009-01-20
Duplicated by Redmine - Defect #9495: weird email notification behaviour Closed 2011-10-30
Duplicated by Redmine - Feature #10791: Broadcast news to project members Closed
Duplicated by Redmine - Defect #14825: News: email notification to users Closed

Associated revisions

Revision 11271
Added by Jean-Philippe Lang almost 5 years ago

Always notify project members about news unless they turned off all notifications (#4700).

History

#1 Updated by Kamil . almost 8 years ago

I have noticed that:
When an user has set the property "Email notifications" in his/her account to:
"For any event on all my projects" 

The notification e-mail about news is sent but when the property is set to
"Only for things I watch or I'm involved in" 

User does not receive e-mails about news.
I think that it is a huge disproportion between receiving e-mails about ALL events and only events about tasks that are assigned to the particular user.
What about "send me info about things i watch, I'm involved in" and separate choice of sending info about:
  • news
  • new forum messages
  • wiki edits
    ?

What do you think?

Kind regards

#2 Updated by Tomasz Mechliński over 7 years ago

+1

#3 Updated by Krzysztof Kowalczyk over 7 years ago

+1
Good to have better control over e-mail notifications.

#4 Updated by Evgeny Pavlov over 7 years ago

+1

User doesn't receive an email notification when news is being created.

#5 Updated by Aleksandra Wozniak over 7 years ago

+1

#6 Updated by Adam Hepner over 7 years ago

+1

#7 Updated by Martin Luder over 7 years ago

+1

#8 Updated by minkbear minkbear over 7 years ago

+1

#9 Updated by Nicholas Kulikov over 7 years ago

+1

#10 Updated by Andrzej Kojder over 7 years ago

+1

#11 Updated by Nikolay Kotlyarov over 7 years ago

+1

#12 Updated by amber herold over 7 years ago

+1

#13 Updated by Jack T over 7 years ago

+1. Definitely would like the ability to have watch-list feature for news updates similar to issue tracker.

#14 Updated by Bruno Medeiros about 7 years ago

It's really annoying, since there's no way to watch news.

So, to receive news by email you need to receive email for everything in the project, and it makes no sense at all.

We need to notify all project members by default, and possibly have a separated option on notification config page.

There's a suggestion of how to do that here:
http://www.redmine.org/boards/2/topics/10744#message-15485

#15 Updated by Bruno Medeiros about 7 years ago

Sorry for double post, but there's also a discussion on #2549 about this.

#16 Updated by Sebastian M. about 7 years ago

+1 This is really annoying.

#17 Updated by Nicholas Kulikov about 7 years ago

Agree. +1

#18 Updated by Craig Chandler almost 7 years ago

+1, would also like the same for file uploads

#19 Updated by Anton Nepomnyaschih over 6 years ago

+1. I think, news is such thing, that every project member must read it ;)

#20 Updated by Etienne Massip over 6 years ago

  • Category set to News

#21 Updated by Pierluigi Soana about 6 years ago

+1 News may not be hidden, otherwise there is no news!

#22 Updated by Michael Diederich about 6 years ago

+1 sigh

#23 Updated by Anonymous about 6 years ago

As a temp workaround I've set up an isolated issue named "ANNOUNCEMENTS"

  • add watchers to this issue
  • when ever you need to announce, add a note to this issue with a link to a news item , wiki change etc...

At least I can control who gets announcements for the time being.

#24 Updated by Brian Kjelin Olsen almost 6 years ago

+1

I think that "Only for things I watch or I'm involved in" should include news. The news can be shown at My page, but I rarely see that page. It's the same with the Overview page for each project - it's rarely that anybody see that page.

#25 Updated by Assaf Lavie almost 6 years ago

I found a patch for this, but warning: I'm a complete Ruby noob and have spent less than 15 minutes understanding the Redmine source code.

Ok, so after this disclaimer here's what I did (and someone please correct this if it's a terrible idea):

In project.rb I've added:

def all_member_emails
  members.{|m| m.user.mail}
end 

And inside the news_added function in mailer.rb I've changed the following line:

recipients news.recipients

into:

recipients news.project.all_member_emails

This seems to solve the problem. I just couldn't find the recipients field in the news model, so it just sends the email to everyone in the project.

#26 Updated by Andriy Lesyuk over 5 years ago

Implemented what you want in my Subscription plugin: http://projects.andriylesyuk.com/projects/subscription
Can't say it's stable... Need testing! It would be cool if you could help (you can just subscribe)...

P.S. Non members can subscribe too (if allowed)...

#27 Updated by Terence Mill over 5 years ago

+ for core feature

#28 Updated by Ladislav Nesnera over 5 years ago

+ for core feature

#29 Updated by Mikołaj Milej over 5 years ago

+1

Is there any quick fix for version 2.0.3?

edit ----
code bellow works

def all_member_emails
members.collect {|m| m.user.mail}
end

#30 Updated by Filou Centrinov almost 5 years ago

+1 That is I am searching for.

#31 Updated by Scott Roland almost 5 years ago

Just an update to Assaf Lavie's patch from above. http://www.redmine.org/issues/4700#note-25
Worked for me with Redmine 2.1.4:

diff -rU1 app.orig/models/mailer.rb app/models/mailer.rb
--- app.orig/models/mailer.rb    2012-11-24 10:51:25.000000000 +0100
+++ app/models/mailer.rb    2013-01-22 17:23:41.311774000 +0100
@@ -146,3 +146,3 @@
     @news_url = url_for(:controller => 'news', :action => 'show', :id => news)
-    mail :to => news.recipients,
+    mail :to => news.project.all_member_emails,
       :subject => "[#{news.project.name}] #{l(:label_news)}: #{news.title}" 
@@ -163,3 +163,3 @@
     @news_url = url_for(:controller => 'news', :action => 'show', :id => news)
-    mail :to => news.recipients,
+    mail :to => news.project.all_member_emails,
      :cc => news.watcher_recipients,
diff -rU1 app.orig/models/project.rb app/models/project.rb
--- app.orig/models/project.rb    2012-11-24 10:51:25.000000000 +0100
+++ app/models/project.rb    2013-01-22 17:34:54.100322000 +0100
@@ -477,2 +477,7 @@

+  # List of emails for all members of a project
+  def all_member_emails
+    members.collect {|m| m.user.mail}
+  end 
+
   # Returns an array of all custom fields enabled for project issues

#32 Updated by billy chou almost 5 years ago

+1

#33 Updated by Jean-Philippe Lang almost 5 years ago

  • Subject changed from Adding news do not send notification to Adding news do not send notification to all project members
  • Category changed from News to Email notifications
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.3.0
  • Resolution set to Fixed

Fixed in r11271. Project members are now always notified about news, unless they have turned off notifications.

#34 Updated by Mischa The Evil almost 5 years ago

  • Subject changed from Adding news do not send notification to all project members to Adding news does not send notification to all project members

#35 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed

#36 Updated by Go MAEDA almost 2 years ago

  • Duplicated by Feature #10791: Broadcast news to project members added

#37 Updated by Toshi MARUYAMA over 1 year ago

#38 Updated by Go MAEDA 10 months ago

  • Duplicated by Defect #14825: News: email notification to users added

Also available in: Atom PDF