Skip to content

Commit

Permalink
Fix bugnote view_state when sending reminder
Browse files Browse the repository at this point in the history
Fixes #26757 (follow-up on issue #10107)
PR #1626
  • Loading branch information
nenadalm committed Mar 3, 2020
1 parent 5e6cc91 commit 0cc0885
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bug_reminder.php
Expand Up @@ -60,6 +60,7 @@
$f_bug_id = gpc_get_int( 'bug_id' );
$f_to = gpc_get_int_array( 'to' );
$f_body = gpc_get_string( 'bugnote_text' );
$f_view_state = gpc_get_bool( 'private' ) ? VS_PRIVATE : VS_PUBLIC;

$t_bug = bug_get( $f_bug_id, true );
if( $t_bug->project_id != helper_get_current_project() ) {
Expand Down Expand Up @@ -109,7 +110,7 @@
$t_attr .= $t_recipient;
}

bugnote_add( $f_bug_id, $f_body, 0, config_get( 'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr, null, false );
bugnote_add( $f_bug_id, $f_body, 0, $f_view_state == VS_PRIVATE, REMINDER, $t_attr, null, false );

# Note: we won't trigger mentions here since reminders are triggered.
}
Expand Down

0 comments on commit 0cc0885

Please sign in to comment.