Skip to content

Commit

Permalink
mc_issue_update() email missing latest notes
Browse files Browse the repository at this point in the history
The mc_issue_update() could result in updating or adding notes to the issue.  Earlier in the method the issue and issue notes are loaded and cached.  Then notes are updated.  Then email API is called which loads the issue + notes again, but this time it hits stale cache.

Fixes #17763
  • Loading branch information
vboctor committed Oct 28, 2014
1 parent 2c93b0d commit 43c39d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/soap/mc_issue_api.php
Expand Up @@ -978,6 +978,10 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
bugnote_add( $p_issue_id, $t_note['text'], mci_get_time_tracking_from_note( $p_issue_id, $t_note ), $t_view_state_id == VS_PRIVATE, $note_type, $note_attr, $t_user_id, FALSE );
}
}

# The issue has been cached earlier in the bug_get() call. Flush the cache since it is
# now stale. Otherwise, the email notification will be based on the cached data.
bugnote_clear_cache( $p_issue_id );
}

if ( isset ( $p_issue['tags']) && is_array ( $p_issue['tags']) ) {
Expand Down

0 comments on commit 43c39d7

Please sign in to comment.