summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-08-19 02:32:11 +0200
committerlpsolit%gmail.com <>2006-08-19 02:32:11 +0200
commit4b92f2749b4c44d60f8ae7b06e2c250a3202e2b7 (patch)
treea6b079375c063e722a6be21f29a23dbe1dab8088
parentcee38ad705168078638221840d57eca473674ed1 (diff)
downloadbugzilla-4b92f2749b4c44d60f8ae7b06e2c250a3202e2b7.tar.gz
bugzilla-4b92f2749b4c44d60f8ae7b06e2c250a3202e2b7.tar.xz
Bug 343050: process_bug.cgi tries to send emails to too many bugs - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
-rwxr-xr-xprocess_bug.cgi11
1 files changed, 9 insertions, 2 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index b26352d22..156f75620 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -1726,12 +1726,16 @@ foreach my $id (@idlist) {
my @oldlist = @{$dbh->selectcol_arrayref("SELECT $target FROM dependencies
WHERE $me = ? ORDER BY $target",
undef, $id)};
- @dependencychanged{@oldlist} = 1;
+
+ # Only bugs depending on the current one should get notification.
+ # Bugs blocking the current one never get notification, unless they
+ # are added or removed from the dependency list. This case is treated
+ # below.
+ @dependencychanged{@oldlist} = 1 if ($me eq 'dependson');
if (defined $cgi->param($target)) {
my %snapshot;
my @newlist = sort {$a <=> $b} @{$deps{$target}};
- @dependencychanged{@newlist} = 1;
while (0 < @oldlist || 0 < @newlist) {
if (@oldlist == 0 || (@newlist > 0 &&
@@ -1768,6 +1772,9 @@ foreach my $id (@idlist) {
}
LogDependencyActivity($id, $oldsnap, $target, $me, $timestamp);
$check_dep_bugs = 1;
+ # All bugs added or removed from the dependency list
+ # must be notified.
+ @dependencychanged{@keys} = 1;
}
}
}