Permalink
Browse files

SOAP API: calling mc_issue_update unduly updated bugnotes

History shows 'Note View State changed' even though it has not been
modified, and if time tracking is enabled the bugnote's last_updated
date is changed.

This was caused by a type-strict comparison of the value returned by the
api (string) to an integer.

Fixes #14412
  • Loading branch information...
1 parent 23c7141 commit 802e5596b9f6a95471a5846f9eaa6668f63cf34c @dregad dregad committed Jul 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 api/soap/mc_issue_api.php
@@ -874,12 +874,12 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
$t_bugnote_changed = true;
}
- if ( $t_bugnote->view_state !== $t_view_state_id ) {
+ if ( $t_bugnote->view_state != $t_view_state_id ) {
bugnote_set_view_state( $t_bugnote_id, $t_view_state_id == VS_PRIVATE );
$t_bugnote_changed = true;
}
- if ( isset( $t_note['time_tracking']) && $t_note['time_tracking'] !== $t_bugnote->time_tracking ) {
+ if ( isset( $t_note['time_tracking']) && $t_note['time_tracking'] != $t_bugnote->time_tracking ) {
bugnote_set_time_tracking( $t_bugnote_id, mci_get_time_tracking_from_note( $p_issue_id, $t_note ) );
$t_bugnote_changed = true;
}

0 comments on commit 802e559

Please sign in to comment.