summaryrefslogtreecommitdiffstats
path: root/contrib/sendunsentbugmail.pl
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-06-05 14:39:19 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2013-06-05 14:39:19 +0200
commite4aa1e72aed102d06d13bfe95a96df4c15ecd068 (patch)
treeca282b9e969fae27b3e49c8915a726bc0a01178b /contrib/sendunsentbugmail.pl
parent9da412006c554d22865913d05b111cf01408e346 (diff)
downloadbugzilla-e4aa1e72aed102d06d13bfe95a96df4c15ecd068.tar.gz
bugzilla-e4aa1e72aed102d06d13bfe95a96df4c15ecd068.tar.xz
Bug 874944: Do not display the Excluded list when sending bugmails
r=dkl a=LpSolit
Diffstat (limited to 'contrib/sendunsentbugmail.pl')
-rwxr-xr-xcontrib/sendunsentbugmail.pl29
1 files changed, 11 insertions, 18 deletions
diff --git a/contrib/sendunsentbugmail.pl b/contrib/sendunsentbugmail.pl
index 94ad25de4..536d12146 100755
--- a/contrib/sendunsentbugmail.pl
+++ b/contrib/sendunsentbugmail.pl
@@ -6,8 +6,8 @@
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
+use 5.10.1;
use strict;
-
use lib qw(. lib);
use Bugzilla;
@@ -25,28 +25,21 @@ my $list = $dbh->selectcol_arrayref(
' ORDER BY bug_id');
if (scalar(@$list) > 0) {
- print "OK, now attempting to send unsent mail\n";
- print scalar(@$list) . " bugs found with possibly unsent mail.\n\n";
+ say "OK, now attempting to send unsent mail";
+ say scalar(@$list) . " bugs found with possibly unsent mail.\n";
foreach my $bugid (@$list) {
my $start_time = time;
- print "Sending mail for bug $bugid...\n";
+ say "Sending mail for bug $bugid...";
my $outputref = Bugzilla::BugMail::Send($bugid);
if ($ARGV[0] && $ARGV[0] eq "--report") {
- print "Mail sent to:\n";
- foreach (sort @{$outputref->{sent}}) {
- print $_ . "\n";
- }
-
- print "Excluded:\n";
- foreach (sort @{$outputref->{excluded}}) {
- print $_ . "\n";
- }
+ say "Mail sent to:";
+ say $_ foreach (sort @{$outputref->{sent}});
}
else {
- my ($sent, $excluded) = (scalar(@{$outputref->{sent}}),scalar(@{$outputref->{excluded}}));
- print "$sent mails sent, $excluded people excluded.\n";
- print "Took " . (time - $start_time) . " seconds.\n\n";
- }
+ my $sent = scalar @{$outputref->{sent}};
+ say "$sent mails sent.";
+ say "Took " . (time - $start_time) . " seconds.\n";
+ }
}
- print "Unsent mail has been sent.\n";
+ say "Unsent mail has been sent.";
}