summaryrefslogtreecommitdiffstats
path: root/extensions/RequestNagger
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/RequestNagger')
-rwxr-xr-xextensions/RequestNagger/bin/send-request-nags.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/extensions/RequestNagger/bin/send-request-nags.pl b/extensions/RequestNagger/bin/send-request-nags.pl
index 7ad0bbb32..e2d746f78 100755
--- a/extensions/RequestNagger/bin/send-request-nags.pl
+++ b/extensions/RequestNagger/bin/send-request-nags.pl
@@ -13,6 +13,10 @@ use warnings;
use FindBin qw($RealBin);
use lib "$RealBin/../../..";
+# if there are more than this many requests that a user is waiting on, show a
+# summary and a link instead.
+use constant MAX_SETTER_COUNT => 7;
+
use Bugzilla;
BEGIN { Bugzilla->extensions() }
@@ -115,6 +119,15 @@ sub send_nags {
map { scalar(@{ $rh->{$report}->{$_} }) . ' ' . $_ }
@{ $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} = [];
+ }
}
}
}