View Issue Details

IDProjectCategoryView StatusLast Update
0008889mantisbtemailpublic2011-06-22 11:53
Reportera_crossley Assigned To 
Status newResolutionopen 
PlatformIntelOSWindowsOS VersionXP/2003
Summary0008889: Status change notification never sent for multi-word status names

Status change emails are never sent for status names that contain spaces.

This is due to a bug in bug_core.api. This bug exists in HEAD and all releases.

See additional information for specifics.

Steps To Reproduce

Add a custom status that is more than one word e.g. "Awaiting Test".
Set email config to email for that status change.
Change a bug to that status.
Note no email notification.

Additional Information

Existing code:
$t_status = strreplace( ' ', '', $t_status );
email_generic( $p_bug_id, $t_status, $t_status_prefix . $t_status );

$t_status is eventually used in a call to email_notify_flags. Problem is here is has its spaces replaced with underscores but the data in the notify_flags array doesn't. Hence the call to email_notify_flags will always fail.

Suggested fix:
$t2_status = strreplace( ' ', '', $t_status );
email_generic( $p_bug_id, $t_status, $t_status_prefix . $t2_status );

TagsNo tags attached.


related to 0009406 assignedvboctor custom status field -> no email notification 




2008-02-16 16:13

reporter   ~0017067

unfortunately the suggested fix seems to fail in version 1.1.0
it results in status change mails no longer being sent at all?



2008-02-16 16:36

reporter   ~0017071

using $t_status2 instead of $t2_status in suggested fix works like without using fix (no advantage for the status names containing spaces but the others getting sent)



2008-02-17 01:07

manager   ~0017086

The design is not to ever have spaces in the status names. For example, if you want to define status "Awaiting Test" with id 60, then you should define it as follows:

In the $g_ enum, you use "60:awaitingtest".
In the $s
string, you use "60:Awaiting Test".

Anywhere in the configuration, you use the "awaiting_test" name, rather than the localized name which has the capitalization and the spaces.



2008-02-17 05:07

reporter   ~0017089

confirmed: I have obeyed this rule, nevertheless I've had the "send mail on status change" box in user's configuration not set. There are several settings above for "send mail on 'confirmed'", "...'reopened'" and so on, so this was why only SOME status changes have been sent by mail (unfortunately those were the ones with spaces in their s_string variable - which is really irrelevant).



2008-02-18 09:12

reporter   ~0017096

Thanks. Following Victor's design rule works as expected without code changes.

It would be useful if the documentation reflected that. The example given in
uses "to be tested" (with spaces not underscores).



2011-06-22 11:53

reporter   ~0029052

This works for me too! Why not closing this issue, i had to click through all related tickets to find this one. All related bugs in the original were marked as new and related.

Issue History

Date Modified Username Field Change
2008-02-14 10:16 a_crossley New Issue
2008-02-16 16:13 pluntke Note Added: 0017067
2008-02-16 16:36 pluntke Note Added: 0017071
2008-02-17 01:07 vboctor Note Added: 0017086
2008-02-17 05:07 pluntke Note Added: 0017089
2008-02-18 09:12 a_crossley Note Added: 0017096
2010-12-27 15:09 atrol Relationship added related to 0009406
2011-06-22 11:53 ojonatan Note Added: 0029052