mantis sends RESOLVED email when status changed to TESTING
Moderators: Developer, Contributor
mantis sends RESOLVED email when status changed to TESTING
Mantis 2.15.0
What could cause the wrong email to be sent? We put a ticket into TESTING status and it sent an email saying RESOLVED. Where should I look, the config files perhaps? Actually, it has BOTH status texts:
The following issue has been RESOLVED.
======================================================================
http://server:8000/view.php?id=651
======================================================================
Reported By: RP
Assigned To: ET
======================================================================
Project: LID
Issue ID: 651
Category: Bug Fix
Reproducibility: always
Severity: minor
Priority: urgent
Status: testing
What could cause the wrong email to be sent? We put a ticket into TESTING status and it sent an email saying RESOLVED. Where should I look, the config files perhaps? Actually, it has BOTH status texts:
The following issue has been RESOLVED.
======================================================================
http://server:8000/view.php?id=651
======================================================================
Reported By: RP
Assigned To: ET
======================================================================
Project: LID
Issue ID: 651
Category: Bug Fix
Reproducibility: always
Severity: minor
Priority: urgent
Status: testing
Re: mantis sends RESOLVED email when status changed to TESTING
MORE INFO:
and
and in config\config_inc.php:
So can anyone see anything wrong? Why would we be able to put the issue into TESTING status and yet Mantis generates a RESOLVED email message?
Code: Select all
J:\MantisBT2150\config>type custom_strings_inc.php
<?php
$s_status_enum_string = '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,80:resolved,85:testing,90:closed';
$s_design_bug_title = 'Currently in Design';
$s_design_bug_button = 'Put in Design';
$s_email_notification_title_for_status_bug_design = 'The following issue is in DESIGN.';
$s_deferred_bug_title = 'Currently Deferred';
$s_deferred_bug_button = 'Put in Deferred';
$s_email_notification_title_for_status_bug_deferred = 'The following issue is DEFERRED.';
$s_development_bug_title = 'Currently in Development';
$s_development_bug_button = 'Put in Development';
$s_email_notification_title_for_status_bug_development = 'The followingissue is in DEVELOPMENT.';
$s_testing_bug_title = 'Currently in Testing';
$s_testing_bug_button = 'Put in Testing';
$s_email_notification_title_for_status_bug_testing = 'The following issue is in TESTING.';
Code: Select all
J:\MantisBT2150\config>type custom_constants_inc.php
<?php
# Custom status codes
define( 'DEFERRED', 15 );
define( 'DESIGN', 60 );
define( 'DEVELOPMENT', 70 );
define( 'TESTING', 85 );
Code: Select all
$g_status_enum_string = '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,80:resolved,85:testing,90:closed';
Re: mantis sends RESOLVED email when status changed to TESTING
Just wondering if someone can tell me which files control this so I can at least start to troubleshoot it. I don't know enough about Mantis to know how it creates and sends emails based on which ticket status.
TIA!
TIA!
Re: mantis sends RESOLVED email when status changed to TESTING
Your problem is that you have set
It would have been better if you had set
Mantis sends the resolved message if the status is set to a value > $g_bug_resolved_status_threshold (default is 80 / RESOLVED)
Unfortunately you can't change it in a simple way now, as you would have to change existing data.
This happens in bug_update.php
Code: Select all
70:development,80:resolved,85:testing,90:closed';
Code: Select all
70:development,75:testing,80:resolved,90:closed';
Unfortunately you can't change it in a simple way now, as you would have to change existing data.
This happens in bug_update.php
Code: Select all
# Determine whether the new status will reopen, resolve or close the issue.
# Note that multiple resolved or closed states can exist and thus we need to
# look at a range of statuses when performing this check.
$t_resolved_status = config_get( 'bug_resolved_status_threshold' );
$t_closed_status = config_get( 'bug_closed_status_threshold' );
$t_reopen_resolution = config_get( 'bug_reopen_resolution' );
$t_resolve_issue = false;
$t_close_issue = false;
$t_reopen_issue = false;
if( $t_existing_bug->status < $t_resolved_status &&
$t_updated_bug->status >= $t_resolved_status &&
$t_updated_bug->status < $t_closed_status
) {
$t_resolve_issue = true;
...
...
# Send a notification of changes via email.
if( $t_resolve_issue ) {
email_resolved( $f_bug_id );
email_relationship_child_resolved( $f_bug_id );
} else if( $t_close_issue ) {
...
...
Re: mantis sends RESOLVED email when status changed to TESTING
So which tables in mySQL would I have to globally change the 85 to a 75 in? We have SQL guys that could do that if it would solve this problem. Then I would change the codes in the Mantis config at the same time and hopefully solve this problem.
Re: mantis sends RESOLVED email when status changed to TESTING
Current status of an issue is stored in mantis_bug_table column status.
The history of status values is stored in mantis_bug_history_table columns old_value and new_value where column_name is status
There might exist stored filters where this status value was used.
Check mantis_filters_table column filter_string
It's not that easy, as the filter_string is json-encoded and you have to change just a small part of the column.
Check als Workflow Transition page if you have changed something for this status.
If so, it's stored in mantis_config_table, but it would be easier to use the UI to adjust the settings after the change.
I hope I did not forget something.
I recommend to try this in a separate database copy before going in production.
The history of status values is stored in mantis_bug_history_table columns old_value and new_value where column_name is status
There might exist stored filters where this status value was used.
Check mantis_filters_table column filter_string
It's not that easy, as the filter_string is json-encoded and you have to change just a small part of the column.
Check als Workflow Transition page if you have changed something for this status.
If so, it's stored in mantis_config_table, but it would be easier to use the UI to adjust the settings after the change.
I hope I did not forget something.
I recommend to try this in a separate database copy before going in production.
Re: mantis sends RESOLVED email when status changed to TESTING
Thank you for that info. We have a separate DEV server setup, including a DEV mySQL installation, for testing new Mantis versions prior to pushing into production for just this situation.
Re: mantis sends RESOLVED email when status changed to TESTING
Associated database edits appear to have worked, with one exception: even thought the config screen looks correct, it no longer sends emails when status changes to TESTING (code 75). All other status changes correctly send email. Perhaps there's one more place to make the change from code 85 to 75?
and
Thoughts on that?
Code: Select all
status_enum_workflow =
array (
10 => '30:acknowledged,15:deferred,20:feedback,40:confirmed,50:assigned,60:design,70:development,75:testing,80:resolved,90:closed',
15 => '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,75:testing,80:resolved,90:closed',
20 => '10:new,15:deferred,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,75:testing,80:resolved,90:closed',
30 => '10:new,15:deferred,20:feedback,40:confirmed,50:assigned,60:design,70:development,75:testing,80:resolved,90:closed',
40 => '10:new,15:deferred,20:feedback,30:acknowledged,50:assigned,60:design,70:development,75:testing,80:resolved,90:closed',
50 => '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,60:design,70:development,75:testing,80:resolved,90:closed',
60 => '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:development,75:testing,80:resolved,90:closed',
70 => '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,75:testing,80:resolved,90:closed',
75 => '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,80:resolved,90:closed',
80 => '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,75:testing,90:closed',
90 => '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,75:testing,80:resolved',
)
Code: Select all
notify_flags =
...
'testing' =>
array (
'reporter' => 1,
'handler' => 1,
'monitor' => 1,
'bugnotes' => 1,
'category' => 1,
'threshold_max' => 0,
),
...
Re: mantis sends RESOLVED email when status changed to TESTING
Perfect. Thank you.