Skip to content

Commit

Permalink
Revert "Issue #11729: Preselect next highest status in bug_change_sta…
Browse files Browse the repository at this point in the history
…tus"

This reverts commit 886dccd, and
fixes #11956, but does not resolve the underlying issue of needing an
explicit workflow defined for the default configuration.
  • Loading branch information
amyreese committed Jul 29, 2010
1 parent 174e0c0 commit 19c2a49
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions core/html_api.php
Expand Up @@ -1369,20 +1369,11 @@ function html_button_bug_change_status( $p_bug_id ) {

if( count( $t_enum_list ) > 0 ) {

# resort the list into ascending order
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each( $t_enum_list );
$t_default = $t_default_arr['key'];
ksort( $t_enum_list );

# Get the default selected option as the next highest available status
# Otherwise fall back to using the last element in the array
end( $t_enum_list );
$t_default = key( $t_enum_list );
reset( $t_enum_list );
foreach( $t_enum_list as $key => $val ) {
if( $key > $t_bug_current_state ) {
$t_default = $key;
break;
}
}

echo "<form method=\"post\" action=\"bug_change_status_page.php\">";
# CSRF protection not required here - form does not result in modifications
Expand Down

0 comments on commit 19c2a49

Please sign in to comment.