Skip to content

Commit

Permalink
re-fixed 0004602: Mismatch between Assign To dropdown and Assigned To…
Browse files Browse the repository at this point in the history
… whil updating

The original behaviour in bug_update*_page was correct and the dropdown was wrong because
it confused the status changes with any other changes.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@3013 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
thraxisp committed Sep 28, 2004
1 parent b8b35d1 commit e4ccc3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions bug_update_advanced_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_update_advanced_page.php,v 1.80 2004-09-28 13:40:19 thraxisp Exp $
# $Id: bug_update_advanced_page.php,v 1.81 2004-09-28 15:03:29 thraxisp Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -174,8 +174,7 @@
<td colspan="5">
<select name="handler_id">
<option value="0"></option>
<?php print_assign_to_option_list( $t_bug->handler_id, $t_bug->project_id,
access_get_status_threshold( $t_bug->status, $t_bug->project_id ) ) ?>
<?php print_assign_to_option_list( $t_bug->handler_id, $t_bug->project_id ) ?>
</select>
</td>

Expand Down
5 changes: 2 additions & 3 deletions bug_update_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_update_page.php,v 1.84 2004-09-28 13:40:20 thraxisp Exp $
# $Id: bug_update_page.php,v 1.85 2004-09-28 15:03:30 thraxisp Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -177,8 +177,7 @@
<td colspan="5">
<select name="handler_id">
<option value="0"></option>
<?php print_assign_to_option_list( $t_bug->handler_id, $t_bug->project_id,
access_get_status_threshold( $t_bug->status, $t_bug->project_id ) ) ?>
<?php print_assign_to_option_list( $t_bug->handler_id, $t_bug->project_id ) ?>
</select>
</td>

Expand Down
9 changes: 4 additions & 5 deletions core/html_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: html_api.php,v 1.132 2004-09-27 12:42:19 vboctor Exp $
# $Id: html_api.php,v 1.133 2004-09-28 15:03:31 thraxisp Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -724,19 +724,18 @@ function html_button_bug_assign_to( $p_bug_id ) {
$t_handler_id = bug_get_field( $p_bug_id, 'handler_id' );
$t_current_user_id = auth_get_current_user_id();
$t_new_status = ( ON == config_get( 'auto_set_status_to_assigned' ) ) ? config_get( 'bug_assigned_status' ) : $t_status;
$t_assign_threshold = access_get_status_threshold( $t_new_status, bug_get_field( $p_bug_id, 'project_id' ) );

$t_options = array();
$t_default_assign_to = null;

if ( ( $t_handler_id != $t_current_user_id ) &&
( access_has_bug_level( $t_assign_threshold, $p_bug_id, $t_current_user_id ) ) ) {
( access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id, $t_current_user_id ) ) ) {
$t_options[] = array( $t_current_user_id, '[' . lang_get( 'myself' ) . ']' );
$t_default_assign_to = $t_current_user_id;
}

if ( ( $t_handler_id != $t_reporter_id ) && user_exists( $t_reporter_id ) &&
( access_has_bug_level( $t_assign_threshold, $p_bug_id, $t_reporter_id ) ) ) {
( access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id, $t_reporter_id ) ) ) {
$t_options[] = array( $t_reporter_id, '[' . lang_get( 'reporter' ) . ']' );

if ( $t_default_assign_to === null ) {
Expand Down Expand Up @@ -780,7 +779,7 @@ function html_button_bug_assign_to( $p_bug_id ) {

$t_project_id = bug_get_field( $p_bug_id, 'project_id' );
# 0 means currently selected
print_assign_to_option_list( 0, $t_project_id, $t_assign_threshold );
print_assign_to_option_list( 0, $t_project_id );
PRINT "</select>";

$t_bug_id = string_attribute( $p_bug_id );
Expand Down

0 comments on commit e4ccc3f

Please sign in to comment.