summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-10-06 17:52:33 +0200
committerDavid Lawrence <dkl@mozilla.com>2014-10-06 17:52:33 +0200
commitaafa79dbed67514aede45f884572c30934854107 (patch)
treedef39520441fdc097877f222a32cc86e5e6fda40 /Bugzilla/Bug.pm
parentc034487bf62423265d0832197e0ff490f82330eb (diff)
parent3e1e67bed36bbe454c654f1e0a16ce73e724a5e0 (diff)
downloadbugzilla-aafa79dbed67514aede45f884572c30934854107.tar.gz
bugzilla-aafa79dbed67514aede45f884572c30934854107.tar.xz
merged with upstream 4.2
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 962c3f36f..39a0f2596 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1012,12 +1012,6 @@ sub update {
join(', ', @added_names)];
}
- # Flags
- my ($removed, $added) = Bugzilla::Flag->update_flags($self, $old_bug, $delta_ts);
- if ($removed || $added) {
- $changes->{'flagtypes.name'} = [$removed, $added];
- }
-
# Comments
foreach my $comment (@{$self->{added_comments} || []}) {
# Override the Comment's timestamp to be identical to the update
@@ -1040,6 +1034,9 @@ sub update {
$user->id, $delta_ts, $comment->id);
}
+ # Clear the cache of comments
+ delete $self->{comments};
+
# Insert the values into the multiselect value tables
my @multi_selects = grep {$_->type == FIELD_TYPE_MULTI_SELECT}
Bugzilla->active_custom_fields;
@@ -1075,6 +1072,12 @@ sub update {
$_->update foreach @{ $self->{_update_ref_bugs} || [] };
delete $self->{_update_ref_bugs};
+ # Flags
+ my ($removed, $added) = Bugzilla::Flag->update_flags($self, $old_bug, $delta_ts);
+ if ($removed || $added) {
+ $changes->{'flagtypes.name'} = [$removed, $added];
+ }
+
# BMO - allow extensions to alter what is logged into bugs_activity
Bugzilla::Hook::process('bug_update_before_logging',
{ bug => $self, timestamp => $delta_ts, changes => $changes, old_bug => $old_bug });