Hello,
I am trying to configure Mantis to send emails to the reporter and the user the ticket was assigned to. I want it to send a message whenever the status changes, regardless of the status. Currently, it only sends an email out when the ticket status is new, resolved or closed. I would like it to send an email out on all the other status changes as well.
Here is what is in my config_defaults_inc.php (there is nothing overriding these settings in the config_inc.php):
# allow email notification
# note that if this is disabled, sign-up and password reset messages will
# not be sent.
$g_enable_email_notification = ON;
# The following two config options allow you to control who should get email
# notifications on different actions/statuses. The first option (default_notify_flags)
# sets the default values for different user categories. The user categories
# are:
#
# 'reporter': the reporter of the bug
# 'handler': the handler of the bug
# 'monitor': users who are monitoring a bug
# 'bugnotes': users who have added a bugnote to the bug
# 'threshold_max': all users with access <= max
# 'threshold_min': ..and with access >= min
#
# The second config option (notify_flags) sets overrides for specific actions/statuses.
# If a user category is not listed for an action, the default from the config
# option above is used. The possible actions are:
#
# 'new': a new bug has been added
# 'owner': a bug has been assigned to a new owner
# 'reopened': a bug has been reopened
# 'deleted': a bug has been deleted
# 'updated': a bug has been updated
# 'bugnote': a bugnote has been added to a bug
# 'sponsor': sponsorship has changed on this bug
# 'relation': a relationship has changed on this bug
# '<status>': eg: 'resolved', 'closed', 'feedback', 'acknowledged', ...etc.
# this list corresponds to $g_status_enum_string
#
# If you wanted to have all developers get notified of new bugs you might add
# the following lines to your config file:
#
# $g_notify_flags['new']['threshold_min'] = DEVELOPER;
# $g_notify_flags['new']['threshold_max'] = DEVELOPER;
#
# You might want to do something similar so all managers are notified when a
# bug is closed. If you didn't want reporters to be notified when a bug is
# closed (only when it is resolved) you would use:
#
# $g_notify_flags['closed']['reporter'] = OFF;
$g_default_notify_flags = array('reporter' => ON,
'handler' => ON,
'monitor' => ON,
'bugnotes' => ON,
'threshold_min' => NOBODY,
'threshold_max' => NOBODY);
# We don't need to send these notifications on new bugs
# (see above for info on this config option)
#@@@ (though I'm not sure they need to be turned off anymore
# - there just won't be anyone in those categories)
# I guess it serves as an example and a placeholder for this
# config option
$g_notify_flags['new'] = array('bugnotes' => OFF,
'monitor' => OFF);
# Whether user's should receive emails for their own actions
$g_email_receive_own = ON;
Any assistance would be appreciated,
Thanks,
Sheel Shah
send emails on any change of status
Moderators: Developer, Contributor
Re: send emails on any change of status
Check out the Mantis manual. It's for 1.2 but most of the info still applies to your version.
http://www.scribd.com/full/2088848?acce ... jvshqlc2hw
You've already identified what you need to change. You'll want to add lines to your config_inc.php file to set thresholds for all of the statuses you want email notifications for. The different statuses can be found in $g_status_enum_string.
$g_notify_flags['acknowledged']['threshold_min'] = REPORTER;
#(or whatever min access level you want to get emails)
$g_notify_flags['acknowledged']['threshold_max'] = MANAGER;
#(or whatever max access level you want to get emails)
http://www.scribd.com/full/2088848?acce ... jvshqlc2hw
You've already identified what you need to change. You'll want to add lines to your config_inc.php file to set thresholds for all of the statuses you want email notifications for. The different statuses can be found in $g_status_enum_string.
$g_notify_flags['acknowledged']['threshold_min'] = REPORTER;
#(or whatever min access level you want to get emails)
$g_notify_flags['acknowledged']['threshold_max'] = MANAGER;
#(or whatever max access level you want to get emails)
Re: send emails on any change of status
Thanks vzw614.
Here is what I put into the config_inc.php (commented out right now). The minimum access level I want to get emails on everything is a "reporter" and the maximum I want to receive is "administrator". Let me know if this is "coded" correctly for what I want to have...
# $g_notify_flags['new']['threshold_min'] = REPORTER;
# $g_notify_flags['new']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['feedback']['threshold_min'] = REPORTER;
# $g_notify_flags['feedback']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['acknowledged']['threshold_min'] = REPORTER;
# $g_notify_flags['acknowledged']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['confirmed']['threshold_min'] = REPORTER;
# $g_notify_flags['confirmed']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['assigned']['threshold_min'] = REPORTER;
# $g_notify_flags['assigned']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['resolved']['threshold_min'] = REPORTER;
# $g_notify_flags['resolved']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['closed']['threshold_min'] = REPORTER;
# $g_notify_flags['closed']['threshold_max'] = ADMINISTRATOR;
Here is what I put into the config_inc.php (commented out right now). The minimum access level I want to get emails on everything is a "reporter" and the maximum I want to receive is "administrator". Let me know if this is "coded" correctly for what I want to have...
# $g_notify_flags['new']['threshold_min'] = REPORTER;
# $g_notify_flags['new']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['feedback']['threshold_min'] = REPORTER;
# $g_notify_flags['feedback']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['acknowledged']['threshold_min'] = REPORTER;
# $g_notify_flags['acknowledged']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['confirmed']['threshold_min'] = REPORTER;
# $g_notify_flags['confirmed']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['assigned']['threshold_min'] = REPORTER;
# $g_notify_flags['assigned']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['resolved']['threshold_min'] = REPORTER;
# $g_notify_flags['resolved']['threshold_max'] = ADMINISTRATOR;
# $g_notify_flags['closed']['threshold_min'] = REPORTER;
# $g_notify_flags['closed']['threshold_max'] = ADMINISTRATOR;
Re: send emails on any change of status
That looks correct. To debug your email notifications you can add the following to your config_inc.php file...
# --- system logging ---
# This controls the logging of information to a separate file for debug or audit
# $g_log_level controls what information is logged
# see constant_inc.php for details on the log channels available
# e.g., $g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_FILTERING | LOG_AJAX;
#
# $g_log_destination specifies the file where the data goes
# right now, only "file:<file path>" is supported
# e.g. (Linux), $g_log_destination = 'file:/tmp/mantis.log';
# e.g. (Windows), $g_log_destination = 'file:c:/temp/mantis.log';
# see http://www.php.net/error_log for details
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:c:/mantis/mantis.log';
Be sure to change the log_destination to a valid location on your installation.
# --- system logging ---
# This controls the logging of information to a separate file for debug or audit
# $g_log_level controls what information is logged
# see constant_inc.php for details on the log channels available
# e.g., $g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_FILTERING | LOG_AJAX;
#
# $g_log_destination specifies the file where the data goes
# right now, only "file:<file path>" is supported
# e.g. (Linux), $g_log_destination = 'file:/tmp/mantis.log';
# e.g. (Windows), $g_log_destination = 'file:c:/temp/mantis.log';
# see http://www.php.net/error_log for details
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:c:/mantis/mantis.log';
Be sure to change the log_destination to a valid location on your installation.
Re: send emails on any change of status
Is there a way to make a configuration change so that when a user is assigned a ticket, they will receive an email?
Thanks in advance,
Sheel
Thanks in advance,
Sheel