View Issue Details

IDProjectCategoryView StatusLast Update
0010231mantisbtfeaturepublic2009-04-20 09:49
ReporterprabhuranganAssigned Tojreese  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0a3 
Target Version1.1.7Fixed in Version1.1.7 
Summary0010231: Assigned bug status cannot be changed to new?
Description

When a bug is assigned to some one, its status cannot be changed to new. If we need to change the status to 'NEW', then we need to first change the Assignee to default ie) empty and then if we change the status to new, it is getting changed

Is this is a Defect?

TagsNo tags attached.
Attached Files
bug_10231.patch (1,211 bytes)   
From ad29a1cefe8f5b77efdc51f00f68127b0e50daa4 Mon Sep 17 00:00:00 2001
From: Brian Wrightson <brian.wrightson@gmail.com>
Date: Tue, 31 Mar 2009 23:04:53 -0400
Subject: [PATCH] Fix #10231: Can't change bugs from Assigned to New

The "auto-assign handling" was preventing the ability to assign a bug that was assigned to a User back to New status.  I can't see that this piece of code does anything except cause that problem so I removed it.
---
 bug_update.php |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/bug_update.php b/bug_update.php
index e1e7747..7a5f5b9 100644
--- a/bug_update.php
+++ b/bug_update.php
@@ -87,13 +87,6 @@
 	$f_time_tracking			= gpc_get_string( 'time_tracking', '0:00' );
 	$f_close_now					= gpc_get_string( 'close_now', false );
 
-	# Handle auto-assigning
-	if ( ( NEW_ == $t_bug_data->status )
-	  && ( 0 != $t_bug_data->handler_id )
-	  && ( ON == config_get( 'auto_set_status_to_assigned' ) ) ) {
-		$t_bug_data->status = config_get( 'bug_assigned_status' );
-	}
-
 	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' );
-- 
1.6.1

bug_10231.patch (1,211 bytes)   
bug_10231_UPDATE.patch (844 bytes)   
From a43f49efe40ba13d7656924ddbc5580dfbcd284d Mon Sep 17 00:00:00 2001
From: Brian Wrightson <brian.wrightson@gmail.com>
Date: Tue, 31 Mar 2009 23:04:53 -0400
Subject: [PATCH] Fix #10231: Can't change bugs from Assigned to New

Put in a check so that an issue won't be auto-assigned if the Handler is updated but the Status is not.
---
 bug_update.php |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bug_update.php b/bug_update.php
index e1e7747..b1fbe99 100644
--- a/bug_update.php
+++ b/bug_update.php
@@ -89,6 +89,7 @@
 
 	# Handle auto-assigning
 	if ( ( NEW_ == $t_bug_data->status )
+	  && ( $t_bug_data->status == $t_old_bug_status )
 	  && ( 0 != $t_bug_data->handler_id )
 	  && ( ON == config_get( 'auto_set_status_to_assigned' ) ) ) {
 		$t_bug_data->status = config_get( 'bug_assigned_status' );
-- 
1.6.1

bug_10231_UPDATE.patch (844 bytes)   

Activities

giallu

giallu

2009-03-21 09:52

reporter   ~0021145

Just tested. The only problem I see is that the assigned=>new transition fails (or is ignored) silently.

Yes, looks like something to fix

jreese

jreese

2009-03-23 16:21

reporter   ~0021163

is this a problem in 1.1.x as well?

bwrightson

bwrightson

2009-03-31 23:57

reporter   ~0021347

I just removed the small chunk of code that was labeled "Handle auto-assigning" and everything seems to work fine. I couldn't find anything else that that particular piece of code did except create the problem outlined in this bug.

prabhurangan

prabhurangan

2009-04-01 06:26

reporter   ~0021350

@bwrightson

Thanks a lot. Issue has been fixed.

bwrightson

bwrightson

2009-04-01 13:21

reporter   ~0021356

That patch "fixes" the reported issue at the expense of some functionality - I'll update it again tonight.

jreese

jreese

2009-04-01 13:31

reporter   ~0021357

Attaching a related IRC log:

<pre>13:09 < bleftson> http://www.mantisbt.org/bugs/view.php?id=10231
13:10 < nuclear_eclipse> bleftson: that fix is "incorrect"; it removes a feature
13:11 < bleftson> that's what i thought, but i went through everything i could possibly think of and i couldn't
find anything that it caused to behave incorrectly
13:12 < nuclear_eclipse> the point of that code is: if you report/update a bug and set a handler while the status
is set to 'new', then MantisBT will automatically change the status to 'assigned' (or whatever the
configured status should be)
13:13 < nuclear_eclipse> however, it should probably have some sort of logic added that checks to see if the
status has been modified, in which case it shoudln't make that auto-assignment
13:13 < bleftson> right - i believe that still happens though when you remove that code - i think it's handled
elsewhere?
13:13 < nuclear_eclipse> no, it doesn't get handled anywhere else
13:13 < bleftson> maybe my confusion comes from terminology
13:13 < bleftson> handler = user?
13:15 < nuclear_eclipse> handler = user assigned to the issue
13:17 < bleftson> ah i see, i see</pre>

bwrightson

bwrightson

2009-04-01 14:43

reporter   ~0021359

OK, the new patch (bug_10231_UPDATE.patch) should allow Assigned->New without killing auto-assign functionality.

jreese

jreese

2009-04-01 14:57

reporter   ~0021360

Fix committed to 1.1.7 and 1.2.x development branches.

prabhurangan

prabhurangan

2009-04-02 03:17

reporter   ~0021368

@bwrightson

The new patch gives me some issue:

Parse error: syntax error, unexpected $end in C:\Documents and Settings\prabhu_rangan\workspace\mylo\bug_update.php on line 240

bwrightson

bwrightson

2009-04-02 07:15

reporter   ~0021371

@prabhurangan

I'm sorry to hear that! I've been trying to reproduce this problem but I've been unable to. Question: I noticed that for you the error occurs on line 240, but my bug_update.php file doesn't even have 240 lines. Are you sure the error is not occurring for some other reason? It's usually do to a missing curly brace. Thoughts?

Related Changesets

MantisBT: master 3b837f17

2009-03-31 23:04

bwrightson


Details Diff
Fix 0010231: Can't change bugs from Assigned to New

Put in a check so that an issue won't be auto-assigned if the Handler is updated but the Status is not.

<span class="signoff">Signed-off-by: John Reese <jreese@leetcode.net></span>
Affected Issues
0010231
mod - bug_update.php Diff File

MantisBT: master-1.1.x 02288569

2009-03-31 23:04

bwrightson


Details Diff
Fix 0010231: Can't change bugs from Assigned to New

Put in a check so that an issue won't be auto-assigned if the Handler is updated but the Status is not.

<span class="signoff">Signed-off-by: John Reese <jreese@leetcode.net></span>
Affected Issues
0010231
mod - bug_update.php Diff File