diff --git a/Source/Source.API.php b/Source/Source.API.php index 5869acf..6764419 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -251,6 +251,11 @@ $t_changeset->bugs = array_unique( array_merge( $t_changeset->bugs, $t_bugs ) ); } + # Save changeset data before processing their consequences + foreach( $p_changesets as $t_changeset ) { + $t_changeset->save(); + } + # Precache information for resolved bugs bug_cache_array_rows( array_keys( $t_fixed_bugs ) ); @@ -356,11 +361,6 @@ # reset the user ID $g_cache_current_user_id = $t_current_user_id; - # Save changes - foreach( $p_changesets as $t_changeset ) { - $t_changeset->save(); - } - # Allow other plugins to post-process commit data event_signal( 'EVENT_SOURCE_COMMITS', array( $p_changesets ) ); event_signal( 'EVENT_SOURCE_FIXED', array( $t_fixed_bugs ) );