View Issue Details

IDProjectCategoryView StatusLast Update
0004856mantisbtbugtrackerpublic2004-12-11 03:02
Reporternaib Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.1 
Fixed in Version0.19.2 
Summary0004856: Close immediately doesn't
Description

I have customised the Mantis system to set $g_allow_close_immediately = ON.

If I check the "Close immediately" checkbox when I'm resolving an issue, it doesn't close immediately, requiring me to close it explicitly.

I'm pretty sure this worked in 0.19.0.

TagsNo tags attached.

Relationships

related to 0004861 closedvboctor Fixed by user0 
related to 0004834 closedvboctor When you reopen an issue (after the issue has been RESOLVED), resolution is not set to REOPENED as it should be 
related to 0004818 closedvboctor Mantis 0.19.2 release 

Activities

2004-11-22 07:20

 

4856_4861.diff (3,581 bytes)   
Index: bug_change_status_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_change_status_page.php,v
retrieving revision 1.10
diff -u -r1.10 bug_change_status_page.php
--- bug_change_status_page.php	8 Oct 2004 18:57:51 -0000	1.10
+++ bug_change_status_page.php	22 Nov 2004 12:55:05 -0000
@@ -112,7 +112,7 @@
 <!-- Custom Fields -->
 <?php
 $t_custom_status_label = "update"; # default info to check
-if ( ( $f_new_status == config_get( 'bug_resolved_status_threshold' ) ) &&
+if ( ( $f_new_status == $t_resolved ) &&
 			( CLOSED > $f_new_status ) ) {
 	$t_custom_status_label = "resolved";
 }
Index: bug_update.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update.php,v
retrieving revision 1.77
diff -u -r1.77 bug_update.php
--- bug_update.php	7 Nov 2004 23:18:49 -0000	1.77
+++ bug_update.php	22 Nov 2004 13:10:17 -0000
@@ -74,8 +74,10 @@
 
 	helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_bug_data, $f_bugnote_text ) );
 
+	$t_resolved = config_get( 'bug_resolved_status_threshold' );
+
 	$t_custom_status_label = "update"; # default info to check
-	if ( $t_bug_data->status == config_get( 'bug_resolved_status_threshold' ) ) {
+	if ( $t_bug_data->status == $t_resolved ) {
 		$t_custom_status_label = "resolved";
 	}
 	if ( $t_bug_data->status == CLOSED ) {
@@ -118,7 +120,7 @@
 		# handle status transitions that come from pages other than bug_*update_page.php
 		# this does the minimum to act on the bug and sends a specific message
 		switch ( $t_bug_data->status ) {
-			case config_get( 'bug_resolved_status_threshold' ):
+			case $t_resolved:
 				# bug_resolve updates the status and bugnote and sends message
 				bug_resolve( $f_bug_id, $t_bug_data->resolution, $t_bug_data->fixed_in_version, 
 						$f_bugnote_text, $t_bug_data->duplicate_id, $t_bug_data->handler_id);
@@ -128,6 +130,11 @@
 				if ( $f_close_now ) {
 					bug_set_field( $f_bug_id, 'status', CLOSED );
 				}
+
+				// update bug data with fields that may be updated inside bug_resolve(), otherwise changes will be overwritten
+				// in bug_update() call below.
+				$t_bug_data->handler_id = bug_get_field( $f_bug_id, 'handler_id' );
+				$t_bug_data->status = bug_get_field( $f_bug_id, 'status' );
 				break;
 
 			case CLOSED:
@@ -135,14 +142,24 @@
 				bug_close( $f_bug_id, $f_bugnote_text );
 				$t_notify = false;
 				$t_bug_note_set = true;
+
+				// update bug data with fields that may be updated inside bug_resolve(), otherwise changes will be overwritten
+				// in bug_update() call below.
+				$t_bug_data->status = bug_get_field( $f_bug_id, 'status' );
+				$t_bug_data->resolution = bug_get_field( $f_bug_id, 'resolution' );
 				break;
 
 			case config_get( 'bug_reopen_status' ):
-				if ( $t_old_bug_status >= config_get( 'bug_resolved_status_threshold' ) ) {
+				if ( $t_old_bug_status >= $t_resolved ) {
 					# bug_reopen updates the status and bugnote and sends message
 					bug_reopen( $f_bug_id, $f_bugnote_text );
 					$t_notify = false;
 					$t_bug_note_set = true;
+
+					// update bug data with fields that may be updated inside bug_resolve(), otherwise changes will be overwritten
+					// in bug_update() call below.
+					$t_bug_data->status = bug_get_field( $f_bug_id, 'status' );
+					$t_bug_data->resolution = bug_get_field( $f_bug_id, 'resolution' );
 					break;
 				} # else fall through to default
 		}
4856_4861.diff (3,581 bytes)   
vboctor

vboctor

2004-11-22 07:22

manager   ~0008388

Fixed in CVS. Also attached patch.

Issue History

Date Modified Username Field Change
2004-11-11 02:18 naib New Issue
2004-11-22 07:17 vboctor Assigned To => vboctor
2004-11-22 07:20 vboctor File Added: 4856_4861.diff
2004-11-22 07:22 vboctor Status new => resolved
2004-11-22 07:22 vboctor Fixed in Version => 0.19.2
2004-11-22 07:22 vboctor Resolution open => fixed
2004-11-22 07:22 vboctor Note Added: 0008388
2004-11-22 08:05 vboctor Relationship added related to 0004834
2004-11-22 08:06 vboctor Relationship added related to 0004861
2004-11-22 08:09 vboctor Relationship added related to 0004818
2004-12-11 03:02 vboctor Status resolved => closed