summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-11-08 17:04:58 +0100
committergerv%gerv.net <>2002-11-08 17:04:58 +0100
commit3535f6d1e21c5859f381db74a1c69a77e9b876f8 (patch)
treeb26b2ddffcfe8e325219ce601da21041c5fa3d66
parent5f52ea9a2d70e9e386ae2aecbd0382d21c16566d (diff)
downloadbugzilla-3535f6d1e21c5859f381db74a1c69a77e9b876f8.tar.gz
bugzilla-3535f6d1e21c5859f381db74a1c69a77e9b876f8.tar.xz
Bug 71794 - processmail shouldn't bother checking dependencies unless state changes. Patch by gerv; r=myk.
-rwxr-xr-xprocess_bug.cgi46
1 files changed, 30 insertions, 16 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index bcc5dd2c7..deb6ea80b 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -1309,6 +1309,10 @@ foreach my $id (@idlist) {
}
}
+ # We need to run processmail for dependson/blocked bugs if the dependencies
+ # change or the status or resolution change. This var keeps track of that.
+ my $check_dep_bugs = 0;
+
if (defined $::FORM{'dependson'}) {
my $me = "blocked";
my $target = "dependson";
@@ -1353,6 +1357,7 @@ foreach my $id (@idlist) {
LogDependencyActivity($k, $snapshot{$k}, $me, $target);
}
LogDependencyActivity($id, $oldsnap, $target, $me);
+ $check_dep_bugs = 1;
}
my $tmp = $me;
@@ -1444,7 +1449,7 @@ foreach my $id (@idlist) {
#
my $origOwner = "";
my $origQaContact = "";
-
+
foreach my $c (@::log_columns) {
my $col = $c; # We modify it, don't want to modify array
# values in place.
@@ -1491,6 +1496,13 @@ foreach my $id (@idlist) {
RemoveVotes($id, 0,
"This bug has been moved to a different product");
}
+
+ if ($col eq 'bug_status'
+ && IsOpenedState($old) ne IsOpenedState($new))
+ {
+ $check_dep_bugs = 1;
+ }
+
LogActivityEntry($id,$col,$old,$new,$whoid,$timestamp);
$bug_changed = 1;
}
@@ -1568,22 +1580,24 @@ foreach my $id (@idlist) {
|| ThrowTemplateError($template->error());
}
- foreach my $k (keys(%dependencychanged)) {
- $vars->{'mail'} = "";
- open(PMAIL, "-|") or exec('./processmail', $k, $::COOKIE{'Bugzilla_login'});
- $vars->{'mail'} .= $_ while <PMAIL>;
- close(PMAIL);
-
- $vars->{'id'} = $k;
- $vars->{'type'} = "dep";
-
- # Let the user know we checked to see if we should email notice
- # of this change to users with a relationship to the dependent
- # bug and who did and didn't receive email about it.
- $template->process("bug/process/results.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
+ if ($check_dep_bugs) {
+ foreach my $k (keys(%dependencychanged)) {
+ $vars->{'mail'} = "";
+ open(PMAIL, "-|")
+ or exec('./processmail', $k, $::COOKIE{'Bugzilla_login'});
+ $vars->{'mail'} .= $_ while <PMAIL>;
+ close(PMAIL);
+
+ $vars->{'id'} = $k;
+ $vars->{'type'} = "dep";
+
+ # Let the user know we checked to see if we should email notice
+ # of this change to users with a relationship to the dependent
+ # bug and who did and didn't receive email about it.
+ $template->process("bug/process/results.html.tmpl", $vars)
+ || ThrowTemplateError($template->error());
+ }
}
-
}
# Show next bug, if it exists.