From: terry%mozilla.org <>
Date: Wed, 3 Nov 1999 06:14:11 +0000 (+0000)
Subject: Due to popular request, "bug changed" mail will only report changes in
X-Git-Tag: bugzilla-2.8~5
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4eaaf5f640895fd3db4092e413bbec3265ab24a7;p=thirdparty%2Fbugzilla.git
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.)
---
diff --git a/processmail b/processmail
index 83ad75bfeb..6d35c6c7a3 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 "Email sent to: $tolist $cclist\n";
+ print "Email sent to: $tolist $cclist\n";
if ($didexclude) {
print "Excluding: $nametoexclude (change your preferences if you wish not to be excluded)\n";
}