View Issue Details

IDProjectCategoryView StatusLast Update
0009157mantisbtotherpublic2009-06-23 15:28
Reporterxeraf Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.1 
Target Version1.2.0rc1Fixed in Version1.2.0rc1 
Summary0009157: 'Change status to' combo shows @@ when the status list is empty.
Description

If the workflow determines that there is no status to go to from a status (e.g., $g_status_enum_workflow[CLOSED] ='';) the 'Change status to:' combo for bugs with that status shows '@@'.

Steps To Reproduce

(a) Configure the workflow with a status with no destinations.
(b) View a bug with the status configured in (a).
(c) Look at the 'Change status to:' combo.

Additional Information
This is how the combo is built:
html_button_change_status (core/html_api.php)
--> get_status_option_list in (core/print_api.php)
--> explode_enum_string (core/utility_api.php)

The problem lies in the explode_enum_string function. When the argument passed to the function is an empty string, it returns explode( ',', '' ). And that is an array with one empty value.

The solution is to return an empty array when an empty string is received. The function would be:

function explode_enum_string( $p_enum_string ) {
    if ( empty($p_enum_string) ) {
        return array();
    }
    return explode( ',', $p_enum_string );
}
Tagspatch

Activities

grangeway

grangeway

2009-04-25 08:44

reporter   ~0021673

Hello,

I've just tested this in the latest release and it appears to be working correctly - the 1.2.0 release will include this functionality.

Paul