summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordklawren <dklawren@users.noreply.github.com>2018-01-03 16:34:11 +0100
committerGitHub <noreply@github.com>2018-01-03 16:34:11 +0100
commitc4c1eb9f453c49f6aa24e9f771ebf060a2c3ac43 (patch)
tree85fdb0c6369cd299d147e7fd9eeda7e4321e28a2
parentcf5aa47fadffcc555543ffb3d606008c8f733cde (diff)
downloadbugzilla-c4c1eb9f453c49f6aa24e9f771ebf060a2c3ac43.tar.gz
bugzilla-c4c1eb9f453c49f6aa24e9f771ebf060a2c3ac43.tar.xz
Bug 1427743 - legacy phabbugz API code errors when trying to set an inactive review flag
-rw-r--r--extensions/PhabBugz/lib/WebService.pm4
1 files changed, 2 insertions, 2 deletions
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) {