commit 4dc516b10c20e57a17569b9277ca93aa5c222b58 Author: Gulacsi Tamas Date: Sun Nov 21 11:39:08 2010 +0100 fix bug_update error with adding bugnote (always private) diff --git a/bug_update.php b/bug_update.php index d47a39d..0842a7d 100644 --- a/bug_update.php +++ b/bug_update.php @@ -123,7 +123,7 @@ $t_updated_bug->view_state = gpc_get_int( 'view_state', $t_existing_bug->view_st $t_bug_note = new BugNoteData(); $t_bug_note->note = gpc_get_string( 'bugnote_text', '' ); -$t_bug_note->view_state = gpc_get_bool( 'private', config_get( 'default_bugnote_view_status' ) ); +$t_bug_note->view_state = gpc_get_bool( 'private', config_get( 'default_bugnote_view_status' ) == VS_PRIVATE ) ? VS_PRIVATE : VS_PUBLIC; $t_bug_note->time_tracking = gpc_get_string( 'time_tracking', '0:00' ); # Determine whether the new status will reopen, resolve or close the issue. @@ -355,7 +355,8 @@ foreach ( $t_custom_fields_to_set as $t_custom_field_to_set ) { # Add a bug note if there is one. if ( $t_bug_note->note || helper_duration_to_minutes( $t_bug_note->time_tracking ) > 0 ) { - bugnote_add( $f_bug_id, $t_bug_note->note, $t_bug_note->time_tracking, $t_bug_note->view_state, 0, '', null, false ); +log_event(LOG_FILTERING, "bugnote_add($f_bug_id, ".$t_bug_note->view_state.')'); + bugnote_add( $f_bug_id, $t_bug_note->note, $t_bug_note->time_tracking, $t_bug_note->view_state == VS_PRIVATE, 0, '', null, false ); } # Add a duplicate relationship if requested.