summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-07-28 19:02:32 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-07-28 19:02:32 +0200
commitb29f60f64c965ce58ae823a7a2314cf892a25008 (patch)
treed7f1f35fea155b1d5748ee1118422b0f0602152c /Bugzilla/Bug.pm
parent457f46daca7eb55a8f517367f387d1c3f0c414ac (diff)
downloadbugzilla-b29f60f64c965ce58ae823a7a2314cf892a25008.tar.gz
bugzilla-b29f60f64c965ce58ae823a7a2314cf892a25008.tar.xz
Bug 396558: Dependency change e-mails should only include status changes that happened right now
r/a=mkanat
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm17
1 files changed, 12 insertions, 5 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index fce2a1634..6638573c6 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1154,14 +1154,22 @@ sub send_changes {
# If there were changes in dependencies, we need to notify those
# dependencies.
- my %notify_deps;
if ($changes->{'bug_status'}) {
my ($old_status, $new_status) = @{ $changes->{'bug_status'} };
# If this bug has changed from opened to closed or vice-versa,
# then all of the bugs we block need to be notified.
if (is_open_state($old_status) ne is_open_state($new_status)) {
- $notify_deps{$_} = 1 foreach (@{ $self->blocked });
+ my $params = { forced => { changer => $user },
+ type => 'dep',
+ dep_only => 1,
+ blocker => $self,
+ changes => $changes };
+
+ foreach my $id (@{ $self->blocked }) {
+ $params->{id} = $id;
+ _send_bugmail($params, $vars);
+ }
}
}
@@ -1177,8 +1185,7 @@ sub send_changes {
# an error later.
delete $changed_deps{''};
- my %all_dep_changes = (%notify_deps, %changed_deps);
- foreach my $id (sort { $a <=> $b } (keys %all_dep_changes)) {
+ foreach my $id (sort { $a <=> $b } (keys %changed_deps)) {
_send_bugmail({ forced => { changer => $user }, type => "dep",
id => $id }, $vars);
}
@@ -1188,7 +1195,7 @@ sub _send_bugmail {
my ($params, $vars) = @_;
my $results =
- Bugzilla::BugMail::Send($params->{'id'}, $params->{'forced'});
+ Bugzilla::BugMail::Send($params->{'id'}, $params->{'forced'}, $params);
if (Bugzilla->usage_mode == USAGE_MODE_BROWSER) {
my $template = Bugzilla->template;