View Issue Details

IDProjectCategoryView StatusLast Update
0011758mantisbtfeaturepublic2014-12-08 00:34
ReporterobonesAssigned Todhx 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0011758: Adding a bug note should not change the status of the issue
Description

Hello,

Right now, there is this code in bugnote_api.php

# if it was FEEDBACK its NEW_ now
if ( bug_get_field( $p_bug_id, 'status' ) == config_get( 'bug_feedback_status' ) && bug_get_field( $p_bug_id, 'reporter_id' ) == $c_user_id ) {
    if ( bug_get_field( $p_bug_id, 'handler_id') == 0 ) {
        bug_set_field( $p_bug_id, 'status', config_get( 'bug_submit_status' ) );
    } else {
        bug_set_field( $p_bug_id, 'status', config_get( 'bug_assigned_status' ) );
    }
}

It's located inside the bugnote_add function.
This is very inconvenient because this is not how we manage our workflow here. For the time being, I commented it out, but it would be much nicer if such change of statuses were handled by a plugin where you could define what do to depending on various criteria.

TagsNo tags attached.

Relationships

related to 0012257 new Move the reassign on feedback feature into a separate plugin 
related to 0012205 closeddhx Do not leave feedback status when the handler adds a note 
related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
child of 0012097 closedatrol Tracking issue for the refactoring of bug_update.php 

Activities

cas

cas

2010-04-07 10:31

reporter   ~0025049

It is easily configured through config_inc.php
Just make a setting like :
$g_revert_feedback = ON;

Next adjust the code like:
$t_revert_feedback = config_get( 'revert_feedback');
if ( ON == $t_revert_feedback) {

if it was FEEDBACK its NEW_ now

if ( bug_get_field( $p_bug_id, 'status' ) == config_get( 'bug_feedback_status' ) && bug_get_field( $p_bug_id, 'reporter_id' ) == $c_user_id ) {
    if ( bug_get_field( $p_bug_id, 'handler_id') == 0 ) {
        bug_set_field( $p_bug_id, 'status', config_get( 'bug_submit_status' ) );
    } else {
        bug_set_field( $p_bug_id, 'status', config_get( 'bug_assigned_status' ) );
    }
}

}

obones

obones

2010-04-07 11:07

reporter   ~0025053

Well, yes, there are many options to disable that code.
But the core of the issue is that it should not do it in the first place as it assumes a workflow which not everyone uses.
Hence the suggestion to have a plugin take care of this.

klkl

klkl

2010-08-13 06:02

reporter   ~0026301

Currently it's configurable via config_get( 'reassign_on_feedback' ). However, bug_change_status_page relies on this function, and calls it after setting desired status. The result is that bugnote changes status again (i.e. when you explicitly set status to feedback and add note at the same time, status will be assigned).

dhx

dhx

2010-08-14 01:03

reporter   ~0026308

I've removed this feature from the bugnote_add() function. The responsibility for handling this feature now lies with the scripts calling bugnote_add(). This is important when you start to consider that the XML import feature calls bugnote_add() where we certainly DON'T want to use the reassign on feedback feature.

The other issue I've fixed is with bug_update.php in MantisBT 1.3.x (this page was refactored recently). If the user has requested the status to be changed to a higher value than the feedback status then we no longer handle the reassign on feedback feature. The status specified by the user will therefore be honoured if it's above the feedback status.

I've created a new issue 0012257 for tracking progress towards moving this functionality into a separate plugin. I agree with the need to do this - it's just a case of having enough time to get around to it.

dhx

dhx

2010-08-14 01:08

reporter   ~0026309

Actually, we should be honouring ALL requests by the user to change the status of a bug via bug_update.php. The reassign on feedback feature should not interfere.

I've committed a follow up patch to fix this problem.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036390

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master b6a27219

2010-08-14 04:44:55

dhx

Details Diff
Fix 0011758: Improve handling of reassign on feedback feature

The bugnote_add() function in bugnote_api.php is currently the only way
(using the API) to add a bugnote into the database. This function was
also attempting to handle the reassign on feedback feature. This posed
a problem because there are times that the bugnote_add() function needs
to be called without considering the reassign on feedback feature. For
example, importing issues from an XML file.

The bugnote_add() function has been changed to no longer handle the
reassign on feedback feature. The resposibility for handling this
feature now belongs within the scripts calling the bugnote_add()
function. The caller scripts are in a much better position to determine
how the reassign on feedback issue will be handled.
mod - core/bugnote_api.php Diff File
mod - bugnote_add.php Diff File
mod - bug_update.php Diff File

MantisBT: master 203f17e6

2010-08-14 05:05:04

dhx

Details Diff
Fix 0011758: Improve handling of reassign on feedback (bug_update)

When updating a bug we should honour any change in status that the user
has requested. The reassign on feedback feature should not be factored
in when the user has explicitly requested a new status for the bug.
mod - bug_update.php Diff File

Issue History

Date Modified Username Field Change
2010-04-07 10:12 obones New Issue
2010-04-07 10:31 cas Note Added: 0025049
2010-04-07 11:07 obones Note Added: 0025053
2010-08-13 06:02 klkl Note Added: 0026301
2010-08-14 00:43 dhx Assigned To => dhx
2010-08-14 00:43 dhx Status new => assigned
2010-08-14 00:45 dhx Target Version => 1.3.0-beta.1
2010-08-14 00:51 dhx Changeset attached => MantisBT master b6a27219
2010-08-14 00:51 dhx Resolution open => fixed
2010-08-14 00:51 dhx Fixed in Version => 1.3.0-beta.1
2010-08-14 01:03 dhx Note Added: 0026308
2010-08-14 01:03 dhx Status assigned => resolved
2010-08-14 01:03 dhx Relationship added related to 0012257
2010-08-14 01:03 dhx Relationship added related to 0012205
2010-08-14 01:04 dhx Relationship added child of 0012097
2010-08-14 01:07 dhx Changeset attached => MantisBT master 203f17e6
2010-08-14 01:08 dhx Note Added: 0026309
2013-04-05 17:57 grangeway Status resolved => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036390
2013-04-05 18:15 grangeway Relationship added related to 0015721
2013-04-06 03:44 dregad Status acknowledged => resolved
2013-04-06 07:20 grangeway Status resolved => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-12-08 00:34 vboctor Status resolved => closed