HOW TO: manage e-mail notifications in Redmine

Redmine is a very lean and powerful web application for project management. We were is using it for managing all different client projects. Recently we realized that the email notification mechanism could be improved to reduce the amount of spam sent to the team members. Read further to learn how we managed to do it, and besides we will share our plug-in with you! Although the tool is excellent, it has some shortcomings. Take for example the Redmine mail notification system. As some users already reported at Redmine forum, after the mail notification is set, it will send mail messages of issue changes even if someone is not changing anything (e.g. simply created an issue). Nor is it possible to stop mailing feature for users that completely do not need it, but are involved in the project and notifications are just spamming their mailbox. Below you will find a screenshot of my mailbox with several emails sent from Redmine on a daily basis.

mail_traffic

Redmine itself doesn’t allow us to configure in more robust way when we would like to be notified.

Mail_options1

Here we have two options:

  • “For any event (…)” which means, that Redmine will inform of any change on the issue, whether the person is assigned to the issue or not.
  • “Only for things I watch or I’m involved in” which gives some relief, but means that Redmine will still be sending messages to a creator of an issue (and that will probably mean all issues if someone is project manager), also watchers will get mails, whether they like it or not.
Mail_options2

This last little option speaks for itself. If you are the one that is changing an issue, then Redmine can spare you the overwhelming amount of notifications. But if one of the developers updates the issue that PM created (even though he is not assigned to it), he will still receive the spam. Despite all its shortcomings, the tool is very important so we couldn’t let this tool be idle and unused, so we created a little fix for it. It comes in the form of a plug-in, but requires some changes in core files in order to run properly. They are as little and neutral as possible, so there is a minimum risk that it will ever get in conflict with the original functions. These code changes are actually hooks and even if the plug-in is removed, it won’t affect the Redmine’s work. Here’s how it looks when the plug-in is added and working.

new_options

On “my account” page you can see two more checkboxes– the upper one is for users who don’t want to be notified when the issue change doesn’t apply to them. The bottom one disables sending mail notification at all. With this option, a project manager, a client, or any other person involved in the project should now feel safe from the notification harassment. It is possible to shut down notifications completely, but if someone, whose name is on the issue, wants to be notified by email it won’t be a problem either. By how much can we reduce the number of e-mails?

If you are a project manager working with Redmine, you probably know how this notification spam can make your life unbearable. For those who do not fully realize the seriousness of the problem just imagine a project that has 20 issues for one phase. Let’s assume you are a PM of this project and cooperate with two other people. You created all those issues, and now for every stage that the issue passes you receive an email. If there are three statuses, this can generate up to 60 emails only in the first phase. What if you had a serious project, with at least 40 open issues and workflow extended to 15 statuses? In this way, you can limit the number of auto e-mails sent from Redmine.

0

Tags:

Aspire Blog Team

Aspire Systems is a global technology services firm serving as a trusted technology partner for our customers. We work with some of the world's most innovative enterprises and independent software vendors, helping them leverage technology and outsourcing in our specific areas of expertise. Our services include Product Engineering, Enterprise Solutions, Independent Testing Services and IT Infrastructure Support services. Our core philosophy of "Attention. Always." communicates our belief in lavishing care and attention on our customers and employees.

14 comments

  1. Hi, can I know if a person intentionally “watches” an issue, would email notifications for that issue override the settings indicated here?

    For e.g., if I create an issue, assign it to someone else and then set it such that I get notified only if I'm assigned to the issue, then I will not get any notifications. But if I watch that issue, would I get notified?

    Just wanted to know which gets higher priority, thanks!

    0
    1. Hi,

      you will get an email only when the issue is reassigned to you. If you only watch it, this setting has higher priority and you will not get email notifications.

      0
  2. Great patch! This is really needed. Would there be a way to modify your patch to only send emails to people who are assigned to an issue AND if they are watching it? Thanks!

    0
  3. well, Open Source project management web application. … for the Redmine Project Management suite that will send out email notifications whenever!

    0
  4. The plugin seems to make the whole Redmine site crash. I am running Redmine 0.9.3 on a Linux Debian server with Passenger. My production.log file shows the following errors each time I want to add or update an issue:
    (Mysql::Error: Table 'redmine.member_preferences' doesn't exist: SELECT * FROM `member_preferences` WHERE (`member_preferences`.member_id = xxx omitted xxx) LIMIT 1):
    app/models/mailer.rb:66:in `issue_edit'
    app/models/mailer.rb:66:in `issue_edit'
    app/models/journal_observer.rb:20:in `after_create'
    /usr/local/lib/ruby/1.8/observer.rb:185:in `notify_observers'
    /usr/local/lib/ruby/1.8/observer.rb:184:in `each'
    /usr/local/lib/ruby/1.8/observer.rb:184:in `notify_observers'
    app/models/journal.rb:43:in `save'
    app/models/issue.rb:443:in `create_journal'
    app/controllers/issues_controller.rb:196:in `edit'
    passenger (2.2.9) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    passenger (2.2.9) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
    passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
    passenger (2.2.9) lib/phusion_passenger/utils.rb:184:in `safe_fork'
    passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:349:in `handle_spawn_application'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:163:in `start'
    passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
    passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

    0
  5. An updated version that works with redmine 1.2.0 (and later I think) that doesn’t require patching redmine is available at http://github.com/friflaj/redmine_mail_configurator (pull request has been submitted but the project doesn’t seem to be active anymore)

    0

Comments are closed.