Skip to content

Commit

Permalink
Fix #2971: add reminder events to the bug history
Browse files Browse the repository at this point in the history
  • Loading branch information
dregad committed Feb 6, 2013
1 parent 4490a54 commit f4753ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bug_reminder.php
Expand Up @@ -55,6 +55,7 @@
# threshold, option is enabled, and not reporter or handler.
foreach ( $f_to as $t_recipient )
{

if ( ON == config_get( 'reminder_recipients_monitor_bug' ) &&
access_has_bug_level( config_get( 'monitor_bug_threshold' ), $f_bug_id ) &&
!bug_is_user_handler( $f_bug_id, $t_recipient ) &&
Expand All @@ -78,6 +79,11 @@
bugnote_add( $f_bug_id, $f_body, 0, config_get( 'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr, NULL, FALSE );
}

# Add history entries for all sent reminders
foreach ( $f_to as $t_recipient ) {
history_log_event_special( $f_bug_id, BUG_REMINDER_SENT, $t_recipient );
}

form_security_purge( 'bug_reminder' );

html_page_top( null, string_get_bug_view_url( $f_bug_id ) );
Expand Down
1 change: 1 addition & 0 deletions core/constant_inc.php
Expand Up @@ -190,6 +190,7 @@
define( 'TAG_RENAMED', 27 );
define( 'BUG_REVISION_DROPPED', 28 );
define( 'BUGNOTE_REVISION_DROPPED', 29 );
define( 'BUG_REMINDER_SENT', 30 );
define( 'PLUGIN_HISTORY', 100 );

# bug revisions
Expand Down
4 changes: 4 additions & 0 deletions core/history_api.php
Expand Up @@ -477,6 +477,10 @@ function history_localize_item( $p_field_name, $p_type, $p_old_value, $p_new_val
$p_old_value = user_get_name( $p_old_value );
$t_note = lang_get( 'bug_monitor' ) . ': ' . $p_old_value;
break;
case BUG_REMINDER_SENT:
$p_old_value = user_get_name( $p_old_value );
$t_note = lang_get( 'reminder_sent_to' ) . ': ' . $p_old_value;
break;
case BUG_UNMONITOR:
$p_old_value = user_get_name( $p_old_value );
$t_note = lang_get( 'bug_end_monitor' ) . ': ' . $p_old_value;
Expand Down

0 comments on commit f4753ec

Please sign in to comment.