summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-05-27 07:26:53 +0200
committerByron Jones <glob@mozilla.com>2015-05-27 07:26:53 +0200
commit4bc64fd88d745ea6b98fac615df3d8fe96419923 (patch)
tree36e7a785d53255f3810beac46fc44f8a7bd4020a /extensions
parent9ed52766bb2ac635ee14aadde520e50102a6d87c (diff)
downloadbugzilla-4bc64fd88d745ea6b98fac615df3d8fe96419923.tar.gz
bugzilla-4bc64fd88d745ea6b98fac615df3d8fe96419923.tar.xz
Bug 1164780: updating an attachment with pre-existing review requests shouldn't enforce the "last logged in to bugzilla" limit
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Review/Extension.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index 8a6835e8f..66fdef3e0 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -22,7 +22,7 @@ use Bugzilla::Install::Filesystem;
use Bugzilla::Search;
use Bugzilla::User;
use Bugzilla::User::Setting;
-use Bugzilla::Util qw(clean_text datetime_from);
+use Bugzilla::Util qw(clean_text datetime_from diff_arrays);
use constant UNAVAILABLE_RE => qr/\b(?:unavailable|pto|away)\b/i;
@@ -589,11 +589,11 @@ sub _check_review_flag {
sub flag_end_of_update {
my ($self, $args) = @_;
- my ($object, $new_flags) = @$args{qw(object new_flags)};
+ my ($object, $old_flags, $new_flags) = @$args{qw(object old_flags new_flags)};
my $bug = $object->isa('Bugzilla::Attachment') ? $object->bug : $object;
- foreach my $orig_change (@$new_flags) {
- my $change = $orig_change; # work on a copy
+ my (undef, $added) = diff_arrays($old_flags, $new_flags);
+ foreach my $change (@$added) {
$change =~ s/^[^:]+://;
my $reviewer = '';
if ($change =~ s/\(([^\)]+)\)$//) {