Skip to content

Commit

Permalink
REST: only update bugnote timestamp when changed
Browse files Browse the repository at this point in the history
Prior to this, any bugnote provided in the Issue PATCH request's body
would see its timestamp updated, even if there was no actual change to
the bugnote's data.

Fixes #33402, PR #1952

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
Ephaltes authored and dregad committed Dec 10, 2023
1 parent fe404e1 commit e03d0f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/soap/mc_issue_api.php
Expand Up @@ -1156,6 +1156,7 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, stdClass $p_iss

if( array_key_exists( $t_bugnote_id, $t_bugnotes_by_id ) ) {
$t_bugnote_changed = false;
$t_bugnote = $t_bugnotes_by_id[$t_bugnote_id];

if( $t_bugnote->note !== $t_note['text'] ) {
bugnote_set_text( $t_bugnote_id, $t_note['text'] );
Expand Down

0 comments on commit e03d0f6

Please sign in to comment.