Skip to content

Commit

Permalink
Avoid blank notes on group assign action
Browse files Browse the repository at this point in the history
Fixes #26570
Fixes #26575
  • Loading branch information
atrol committed Jan 12, 2020
1 parent 4bb8652 commit 8b34e48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/bug_api.php
Expand Up @@ -1875,8 +1875,10 @@ function bug_assign( $p_bug_id, $p_user_id, $p_bugnote_text = '', $p_bugnote_pri
history_log_event_direct( $p_bug_id, 'handler_id', $h_handler_id, $p_user_id );

# Add bugnote if supplied ignore false return
$t_bugnote_id = bugnote_add( $p_bug_id, $p_bugnote_text, 0, $p_bugnote_private, 0, '', null, false );
bugnote_process_mentions( $p_bug_id, $t_bugnote_id, $p_bugnote_text );
if( !is_blank( $p_bugnote_text ) ) {
$t_bugnote_id = bugnote_add( $p_bug_id, $p_bugnote_text, 0, $p_bugnote_private, 0, '', null, false );
bugnote_process_mentions( $p_bug_id, $t_bugnote_id, $p_bugnote_text );
}

# updated the last_updated date
bug_update_date( $p_bug_id );
Expand Down Expand Up @@ -2301,4 +2303,4 @@ function bug_cache_columns_data( array $p_bugs, array $p_selected_columns ) {
if( !empty( $t_custom_field_ids ) ) {
custom_field_cache_values( $t_bug_ids, $t_custom_field_ids );
}
}
}

0 comments on commit 8b34e48

Please sign in to comment.