View Issue Details

IDProjectCategoryView StatusLast Update
0011710mantisbtplug-inspublic2010-09-19 03:13
Reportermkb Assigned Todhx  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0 
Summary0011710: EVENT_BUG_UPDATE fired after bug satus is changes for some statuses (e.g. CLOSED)
Description

EVENT_BUG_UPDATE is for some status changes (e.g. CLOSED) fired only AFTER new status was already saved into database. It means that even plugin thorws an error data are saved.

I suggest fixing this by moving following lines in bug_update.php:

Plugin support

    $t_new_bug_data = event_signal( 'EVENT_UPDATE_BUG', $t_bug_data, $f_bug_id );
    if ( !is_null( $t_new_bug_data ) ) {
            $t_bug_data = $t_new_bug_data;
    }

before special bug states are handled (about line 158 in 1.2.0 sources).

Steps To Reproduce
  1. Create simple plugin which listens to EVENT_BUG_UPDATE. Just throw an error on this event.
  2. Install the plugin.
  3. Try to close a bug.
  4. Error message is shown.
  5. Check status of the bug - it is changed to closed.
Additional Information

Our case: we need to check if there is an integration test attached before a bug is closed. We are checking this in plugin using EVENT_BUG_UPDATE. But if status is changed before our test takes place user can close the bug even without integration test.

TagsNo tags attached.

Relationships

duplicate of 0011967 closeddhx Problems with EVENT_UPDATE_BUG 

Activities

dhx

dhx

2010-06-19 01:05

reporter   ~0025917

Will be fixed very soon, please see 0011967. Thanks for reporting this bug and sorry for the delayed response.