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.)


git-svn-id: svn://10.0.0.236/trunk@52588 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
terry%mozilla.org
1999-11-02 22:14:11 +00:00
parent a90526ccd9
commit 927e36576b

View File

@@ -123,15 +123,23 @@ 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";
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 . "[$bug_status$resolution]");
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;
$me = $target;
@@ -314,13 +322,14 @@ 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;
close SENDMAIL;
$logstr = "$logstr; mail sent to $tolist, $cclist";
print "<B>Email sent to:</B> $tolist $cclist\n";
print "<B>Email sent to:</B> $tolist $cclist\n";
if ($didexclude) {
print "<B>Excluding:</B> $nametoexclude (<a href=changepassword.cgi>change your preferences</a> if you wish not to be excluded)\n";
}