summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 64627f4e9..567c130f4 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2519,8 +2519,12 @@ sub any_flags_requesteeble {
if exists $self->{'any_flags_requesteeble'};
return 0 if $self->{'error'};
- $self->{'any_flags_requesteeble'} =
- grep($_->{'is_requesteeble'}, @{$self->flag_types});
+ my $any_flags_requesteeble =
+ grep { $_->is_requestable && $_->is_requesteeble } @{$self->flag_types};
+ # Useful in case a flagtype is no longer requestable but a requestee
+ # has been set before we turned off that bit.
+ $any_flags_requesteeble ||= grep { $_->requestee_id } @{$self->flags};
+ $self->{'any_flags_requesteeble'} = $any_flags_requesteeble;
return $self->{'any_flags_requesteeble'};
}