From: dklawren Date: Wed, 3 Jan 2018 15:34:11 +0000 (-0500) Subject: Bug 1427743 - legacy phabbugz API code errors when trying to set an inactive review... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4c1eb9f453c49f6aa24e9f771ebf060a2c3ac43;p=thirdparty%2Fbugzilla.git Bug 1427743 - legacy phabbugz API code errors when trying to set an inactive review flag --- diff --git a/extensions/PhabBugz/lib/WebService.pm b/extensions/PhabBugz/lib/WebService.pm index f8c109612..80a7df9b1 100644 --- a/extensions/PhabBugz/lib/WebService.pm +++ b/extensions/PhabBugz/lib/WebService.pm @@ -183,7 +183,7 @@ sub update_reviewer_statuses { my (@denied_flags, @new_flags, @removed_flags, %accepted_done, $flag_type); foreach my $flag (@{ $attachment->flags }) { next if $flag->type->name ne 'review'; - $flag_type = $flag->type; + $flag_type = $flag->type if $flag->type->is_active; if (any { $flag->setter->id == $_ } @$denied_user_ids) { push(@denied_flags, { id => $flag->id, setter => $flag->setter, status => 'X' }); } @@ -196,7 +196,7 @@ sub update_reviewer_statuses { } } - $flag_type ||= first { $_->name eq 'review' } @{ $attachment->flag_types }; + $flag_type ||= first { $_->name eq 'review' && $_->is_active } @{ $attachment->flag_types }; # Create new flags foreach my $user_id (@$accepted_user_ids) {