From 4c751704c9644faf357adeea13584b08a359593d Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 2 Jun 2015 13:20:15 +0800 Subject: Bug 1169173: Empty emails for overdue requests --- extensions/RequestNagger/bin/send-request-nags.pl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'extensions/RequestNagger/bin/send-request-nags.pl') diff --git a/extensions/RequestNagger/bin/send-request-nags.pl b/extensions/RequestNagger/bin/send-request-nags.pl index ae8d8fd3f..e621a8bdc 100755 --- a/extensions/RequestNagger/bin/send-request-nags.pl +++ b/extensions/RequestNagger/bin/send-request-nags.pl @@ -76,6 +76,7 @@ send_nags( sub send_nags { my (%args) = @_; my $requests = {}; + my $watching = $args{template} eq 'watching'; # get requests @@ -121,13 +122,15 @@ sub send_nags { @{ $rh->{types}->{$report} } ); - # remove links to reports with too many items to display - my $total = 0; - foreach my $type (@{ $rh->{types}->{$report} }) { - $total += scalar(@{ $rh->{$report}->{$type} }); - } - if ($total > MAX_SETTER_COUNT) { - $rh->{types}->{$report} = []; + if ($watching && $report eq 'setter') { + # remove links to reports with too many items to display + my $total = 0; + foreach my $type (@{ $rh->{types}->{$report} }) { + $total += scalar(@{ $rh->{$report}->{$type} }); + } + if ($total > MAX_SETTER_COUNT) { + $rh->{types}->{$report} = []; + } } } } -- cgit v1.2.3-24-g4f1b