View Issue Details

IDProjectCategoryView StatusLast Update
0023997mantisbtpreferencespublic2018-02-18 05:15
Reportercproensa Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version2.12.0 
Summary0023997: Email for submitted issues is always sent, regardless of configuration
Description

Seems like the email notification for:
The following issue has been SUBMITTED.
is always sent, and there is no configuration to say whether it should or not be sent.

I suggest to make it work linked to status change notifications settings. Then, the email is sent according to the notification settings of the starting status for this issue.

Note that currently we already link some status related configuration regarding issue creation. For example, "report_bug_threshold" is linked to the workflow settigs for "bug_submit_status".

TagsNo tags attached.

Activities

cproensa

cproensa

2018-02-18 05:13

developer   ~0058925

Last edited: 2018-02-18 05:15

This is what is documented in config_defaults_inc:

 * 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
 *         'monitor': an issue is monitored.
 *        '<status>': eg: 'resolved', 'closed', 'feedback', 'acknowledged', etc.
 *                     this list corresponds to $g_status_enum_string
 *

The standard list of status:

$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed';

How this is called:

function email_bug_added( $p_bug_id ) {
    log_event( LOG_EMAIL, sprintf( 'Issue #%d reported', $p_bug_id ) );
    email_generic( $p_bug_id, 'new', 'email_notification_title_for_action_bug_submitted' );
}
  • The option documentation seems to describe a "new" action for the flags array, but there's also the action for status "new" (as there is "assigned", "resolved", etc)
    This is a conflict
  • In manage_config_email_page.php there is no entry for that "new" action, meaning "Send and email when an isue is created". The configuration is therefore effectively being used as the status "new"
  • When status for new issues is configured to other than "new", the code still sends email according to "new" flags. IMO, it should follow "<new_status>" flags