summaryrefslogtreecommitdiffstats
path: root/processmail
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-11-03 07:14:11 +0100
committerterry%mozilla.org <>1999-11-03 07:14:11 +0100
commit4eaaf5f640895fd3db4092e413bbec3265ab24a7 (patch)
treefed235523112941247b44c55e1e2d284a7b57ffc /processmail
parent0940186cb962fe6027e2ad40d3f27d0075b57409 (diff)
downloadbugzilla-4eaaf5f640895fd3db4092e413bbec3265ab24a7.tar.gz
bugzilla-4eaaf5f640895fd3db4092e413bbec3265ab24a7.tar.xz
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.)
Diffstat (limited to 'processmail')
-rwxr-xr-xprocessmail25
1 files changed, 17 insertions, 8 deletions
diff --git a/processmail b/processmail
index 83ad75bfe..6d35c6c7a 100755
--- a/processmail
+++ b/processmail
@@ -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";
}