Project

General

Profile

Bug #9873

Failed report notifications for hosts owned by group only go to last user listed in group.

Added by Roger Spencer over 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
E-Mail
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

From: https://groups.google.com/forum/#!topic/foreman-users/Qu5SKKyZR20

Just upgraded to Foreman 1.7.3 (from a very old version). One issue we're seeing is if a server is owned by a group, failed puppet run reports only go to the last person listed in that group.

For example, have the following group with members:

Administrators:
- Alfred Pence
- Bob Smith
- Frank Jones

If server web.example.com is owned by Administrators and has a failed puppet run Frank Jones only gets the failed puppet run notice in his email. If we take Frank out of the group, then Bob Smith will get it. Take both Frank and Bob out of the group, then Alfred will get it.


Related issues

Has duplicate Foreman - Bug #8795: Email notifications can clutter the logResolved2014-12-28
Blocks Katello - Bug #10572: When multiple users are subscribed, satellite sends notification to one user onlyClosed2015-05-21

Associated revisions

Revision c8042418 (diff)
Added by Dominic Cleal about 7 years ago

fixes #9873 - generate unique alert mails for each user group member

To create distinct mails, new Mailer instances are required instead of using
the same one - else, the last message changes the previous ones. The recipient
list is now determined in the ReportImporter, and the MailNotification helps
create Mailers for each recipient.

The locale is also set correctly for each recipient this way, ensuring their
subject lines are now also translated.

Revision 0fd81057 (diff)
Added by Dominic Cleal about 7 years ago

fixes #9873 - generate unique alert mails for each user group member

To create distinct mails, new Mailer instances are required instead of using
the same one - else, the last message changes the previous ones. The recipient
list is now determined in the ReportImporter, and the MailNotification helps
create Mailers for each recipient.

The locale is also set correctly for each recipient this way, ensuring their
subject lines are now also translated.

(cherry picked from commit c804241883adc6a1dc0c7fc14cb47e60a7fcb76c)

Conflicts:
app/mailers/audit_mailer.rb
app/mailers/host_mailer.rb
test/unit/application_mailer_test.rb
test/unit/host_mailer_test.rb

History

#1 Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#2 Updated by The Foreman Bot over 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2314 added
  • Pull request deleted ()

#3 Updated by Dominic Cleal about 7 years ago

  • Has duplicate Bug #8795: Email notifications can clutter the log added

#4 Updated by Stephen Benjamin about 7 years ago

  • Bugzilla link set to 1223050

#5 Updated by Dominic Cleal about 7 years ago

  • Legacy Backlogs Release (now unused) set to 56

#6 Updated by Stephen Benjamin about 7 years ago

  • Bugzilla link deleted (1223050)

Removing the BZ and creating a separate issue for Katello

#7 Updated by Stephen Benjamin about 7 years ago

  • Blocks Bug #10572: When multiple users are subscribed, satellite sends notification to one user only added

#8 Updated by Dominic Cleal about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF