Configure email notification preferences on field updates

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
ptandler
Posts: 20
Joined: 31 May 2006, 15:31
Location: Darmstadt, Germany
Contact:

Configure email notification preferences on field updates

Post by ptandler »

I do receive many email notifivations from mantis when e.g. the category or target version etc fields are changed, which is not that much interesting to me.

Is there a way to configure the notifications for this kind of emails?

On the account_prefs_page I can configure:

E-mail on New With Minimum Severity of
E-mail on Change of Handler With Minimum Severity of
E-mail on Feedback With Minimum Severity of
E-mail on Resolved With Minimum Severity of
E-mail on Closed With Minimum Severity of
E-mail on Reopened With Minimum Severity of
E-mail on Note Added With Minimum Severity of
E-mail on Status Change With Minimum Severity of
E-mail on Priority Change With Minimum Severity of

And I unchecked Status Change and Priority Change. But I didn't find a way to opt-out for the other field changes. Is there such an options somewhere?
If not, I'd appreciate a hint where I could look in the source to add this option. Thanks!

I'm using mantis version 1.2.0
Cheers,
Peter
atrol
Site Admin
Posts: 8553
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Configure email notification preferences on field update

Post by atrol »

This is not implemented at the moment.
If you have a look at file core/email_api.php you will find something like

Code: Select all

		case 'deleted':
		case 'updated':
		case 'sponsor':
		case 'relation':
		case 'monitor':
		case 'priority': # This is never used, but exists in the database!
			# FIXME: these notification actions are not actually implemented
			# in the database and therefore aren't adjustable on a per-user
			# basis! The exception is 'monitor' that makes no sense being a
			# customisable per-user preference.
			$t_pref_field = false;
BTW, you should upgrade 1.2.0 to 1.2.17 as we fixed a huge number of bugs since 1.2.0, some of them are major security issues.
Please use Search before posting and read the Manual
ptandler
Posts: 20
Joined: 31 May 2006, 15:31
Location: Darmstadt, Germany
Contact:

Re: Configure email notification preferences on field update

Post by ptandler »

Thanks for your quick help!

So I probably just try to set $t_pref_field to 'email_on_status' for all the cases that currently don't have a preference and see if this works for all of us.

I know that we should update our installation, but we have some customization which will require some time to migrate, so we always postponed this. And our mantis is running internally only, so security fixed are not that crucial, I hope.

Thanks again,
Peter
Cheers,
Peter
ptandler
Posts: 20
Joined: 31 May 2006, 15:31
Location: Darmstadt, Germany
Contact:

Re: Configure email notification preferences on field update

Post by ptandler »

I now changed this to (commented out some of the cases):

Code: Select all

		case 'deleted':
#		case 'updated': #### 2014-03-08-pet - in these cases (updated, relation) use the "email_on_status" user preference!!!
#		case 'sponsor':
#		case 'relation':
		case 'monitor':
#		case 'priority': # This is never used, but exists in the database!
			# FIXME: these notification actions are not actually implemented
			# in the database and therefore aren't adjustable on a per-user
			# basis! The exception is 'monitor' that makes no sense being a
			# customisable per-user preference.
			$t_pref_field = false;
			break;
		default:
			# Anything not built-in is probably going to be a status
			$t_pref_field = 'email_on_status';
			break;
This works quite fine and I wonder if this change could be included in the distribution - until some more options are added (which is not necessary from my point of view).

Thanks again for your help!
Cheers,
Peter
Post Reply