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 {
}
if (@list) {
my @verbose;
my $count = 0;
foreach my $i (@list) {
SendSQL("select bug_status, resolution from bugs where bug_id = $i");
my ($bug_status, $resolution) = (FetchSQLData());
if ($resolution ne "") {
$resolution = "/$resolution";
}
push(@verbose, $i . "[$bug_status$resolution]");
}
SendSQL("select bug_status from bugs where bug_id = $i");
my ($bug_status) = (FetchSQLData());
my $desc = "[Closed]";
if ($bug_status eq "OPEN" || $bug_status eq "NEW" ||
$bug_status eq "REOPENED") {
$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";
}
}
my $tmp = $me;
$me = $target;
$target = $tmp;
......@@ -314,7 +322,8 @@ sub ProcessOneBug {
my $msg = PerformSubsts(Param("changedmail"), \%substs);
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") ||
die "Can't open sendmail";
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