Commit 4eaaf5f6 authored by terry%mozilla.org's avatar terry%mozilla.org

Due to popular request, "bug changed" mail will only report changes in

state on dependent bugs if they move from an 'open' to a 'closed' state, or visa-versa. Also, if there are more than 5 bugs on the list, then we won't even try to generate the details (doing so only generates lots of extra mail that is too hard to parse anyway.)
parent 0940186c
...@@ -123,16 +123,24 @@ sub DescDependencies { ...@@ -123,16 +123,24 @@ sub DescDependencies {
} }
if (@list) { if (@list) {
my @verbose; my @verbose;
my $count = 0;
foreach my $i (@list) { foreach my $i (@list) {
SendSQL("select bug_status, resolution from bugs where bug_id = $i"); SendSQL("select bug_status from bugs where bug_id = $i");
my ($bug_status, $resolution) = (FetchSQLData()); my ($bug_status) = (FetchSQLData());
if ($resolution ne "") { my $desc = "[Closed]";
$resolution = "/$resolution"; if ($bug_status eq "OPEN" || $bug_status eq "NEW" ||
} $bug_status eq "REOPENED") {
push(@verbose, $i . "[$bug_status$resolution]"); $desc = "";
} }
push(@verbose, $i . "$desc");
$count++;
}
if ($count > 5) {
$result .= "$title: Big list (more than 5) has been omitted\n";
} else {
$result .= "$title: " . join(', ', @verbose) . "\n"; $result .= "$title: " . join(', ', @verbose) . "\n";
} }
}
my $tmp = $me; my $tmp = $me;
$me = $target; $me = $target;
$target = $tmp; $target = $tmp;
...@@ -314,7 +322,8 @@ sub ProcessOneBug { ...@@ -314,7 +322,8 @@ sub ProcessOneBug {
my $msg = PerformSubsts(Param("changedmail"), \%substs); my $msg = PerformSubsts(Param("changedmail"), \%substs);
if (!$regenerate) { if (!$regenerate) {
# Note: fixaddresses may result in a Cc: only. This seems harmless. # Note: fixaddresses may result in a Cc: only. This seems
# harmless.
open(SENDMAIL, "|/usr/lib/sendmail -t") || open(SENDMAIL, "|/usr/lib/sendmail -t") ||
die "Can't open sendmail"; die "Can't open sendmail";
print SENDMAIL $msg; print SENDMAIL $msg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment