summaryrefslogtreecommitdiffstats
path: root/extensions/PhabBugz
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2017-12-20 18:17:32 +0100
committerDylan William Hardison <dylan@hardison.net>2017-12-20 19:03:10 +0100
commitd87c64e5805adb4bae54b10d517c10463a9251fc (patch)
tree2778cb3056f080f8f40c961be6acb2c0bf423222 /extensions/PhabBugz
parent87f0c3700ea20b61a947999ff7c081eb0b61625d (diff)
downloadbugzilla-d87c64e5805adb4bae54b10d517c10463a9251fc.tar.gz
bugzilla-d87c64e5805adb4bae54b10d517c10463a9251fc.tar.xz
Bug 1426424 - feed daemon complains when trying to set an inactive review flag
Diffstat (limited to 'extensions/PhabBugz')
-rw-r--r--extensions/PhabBugz/lib/Feed.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/PhabBugz/lib/Feed.pm b/extensions/PhabBugz/lib/Feed.pm
index b2b681bbd..66b05e4ec 100644
--- a/extensions/PhabBugz/lib/Feed.pm
+++ b/extensions/PhabBugz/lib/Feed.pm
@@ -226,7 +226,7 @@ sub process_revision_change {
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' });
}
@@ -239,7 +239,7 @@ sub process_revision_change {
}
}
- $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) {