Defect #4700
closedAdding news does not send notification to all project members
0%
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
Updated by Kamil . over 14 years ago
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
Updated by Krzysztof Kowalczyk over 14 years ago
+1
Good to have better control over e-mail notifications.
Updated by Evgeny Pavlov over 14 years ago
+1
User doesn't receive an email notification when news is being created.
Updated by Jack T about 14 years ago
+1. Definitely would like the ability to have watch-list feature for news updates similar to issue tracker.
Updated by Bruno Medeiros almost 14 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
Updated by Bruno Medeiros almost 14 years ago
Sorry for double post, but there's also a discussion on #2549 about this.
Updated by Craig Chandler over 13 years ago
+1, would also like the same for file uploads
Updated by Anton Nepomnyaschih over 13 years ago
+1. I think, news is such thing, that every project member must read it ;)
Updated by Pierluigi Soana almost 13 years ago
+1 News may not be hidden, otherwise there is no news!
Updated by Anonymous almost 13 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.
Updated by Brian Kjelin Olsen over 12 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.
Updated by Assaf Lavie over 12 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.
Updated by Andriy Lesyuk over 12 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)...
Updated by Mikołaj Milej about 12 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
Updated by Scott Roland over 11 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
Updated by Jean-Philippe Lang over 11 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.
Updated by Mischa The Evil over 11 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
Updated by Jean-Philippe Lang over 11 years ago
- Status changed from Resolved to Closed
Updated by Go MAEDA over 8 years ago
- Has duplicate Feature #10791: Broadcast news to project members added
Updated by Toshi MARUYAMA over 8 years ago
- Related to Feature #2549: Enable the watching of news added
Updated by Go MAEDA over 7 years ago
- Has duplicate Defect #14825: News: email notification to users added