From 4bc64fd88d745ea6b98fac615df3d8fe96419923 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 27 May 2015 13:26:53 +0800 Subject: Bug 1164780: updating an attachment with pre-existing review requests shouldn't enforce the "last logged in to bugzilla" limit --- extensions/Review/Extension.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extensions') 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/\(([^\)]+)\)$//) { -- cgit v1.2.3-24-g4f1b