summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Bug.pm4
-rw-r--r--extensions/Needinfo/Extension.pm7
2 files changed, 5 insertions, 6 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index f8566be4a..6973ae2fc 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -781,6 +781,10 @@ sub update {
my ($changes, $old_bug) = $self->SUPER::update(@_);
+ Bugzilla::Hook::process('bug_start_of_update',
+ { timestamp => $delta_ts, bug => $self,
+ old_bug => $old_bug, changes => $changes });
+
# Certain items in $changes have to be fixed so that they hold
# a name instead of an ID.
foreach my $field (qw(product_id component_id)) {
diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm
index 2958031be..7999d6ae7 100644
--- a/extensions/Needinfo/Extension.pm
+++ b/extensions/Needinfo/Extension.pm
@@ -10,7 +10,6 @@ use strict;
use base qw(Bugzilla::Extension);
-use Bugzilla::Bug;
use Bugzilla::User;
use Bugzilla::Flag;
use Bugzilla::FlagType;
@@ -49,7 +48,7 @@ sub install_update_db {
# Clear the needinfo? flag if comment is being given by
# requestee or someone used the override flag.
-sub bug_end_of_update {
+sub bug_start_of_update {
my ($self, $args) = @_;
my $bug = $args->{bug};
my $old_bug = $args->{old_bug};
@@ -157,7 +156,6 @@ sub bug_end_of_update {
my $field = 'flagtypes.name';
$removed = defined $removed ? $removed : '';
$added = defined $added ? $added : '';
- LogActivityEntry($bug->id, $field, $removed, $added, $user->id, $timestamp);
# Do not overwrite other flag changes
if ($changes->{$field}) {
@@ -169,9 +167,6 @@ sub bug_end_of_update {
: $added;
}
$changes->{$field} = [$removed, $added];
-
- # Adding a flag may result in CC'ing a user, call update to process
- $bug->update() if $added;
}
}
}