From 19c2a492242832d595922037a073bfd83e9b8c22 Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 29 Jul 2010 09:52:05 -0400 Subject: [PATCH] Revert "Issue #11729: Preselect next highest status in bug_change_status" This reverts commit 886dccd9a467c892a165e7a755a6b13d0d8ed365, and fixes #11956, but does not resolve the underlying issue of needing an explicit workflow defined for the default configuration. --- core/html_api.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/core/html_api.php b/core/html_api.php index 61be4d4518..58072c8545 100644 --- a/core/html_api.php +++ b/core/html_api.php @@ -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 "
"; # CSRF protection not required here - form does not result in modifications