How to stop e-mail notifications for certain issue changes

Added by Kevin O over 6 years ago

I've set up a plugin for our Redmine install which allows for drag and drop re-ordering of projects based on a custom field (integer) called "Order" via the API.

However, since this updates a lot of project tickets at once, under normal e-mail notification settings, this leads to a whole lot of unnecessary e-mails going out to all the recipients.

So, I've tried to block these e-mails, but the only way I know to test for this is to check if the only field that was updated was the Order field. However, I can't seem to figure out how to hook into the mail handler in a way that exposes the params for me so I can for it.

Thus what I had to end up doing was overriding the deliver! method with an alias in a helper patch in my plugin, and then do a regex check for "Order changed to".

Tell me there must be a better way to do this? I'd suffice with being able to turn off e-mails for issues that were changed via the API or such.

Thanks in advance for any help.