summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/TrackingFlags/lib/Flag.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/extensions/TrackingFlags/lib/Flag.pm b/extensions/TrackingFlags/lib/Flag.pm
index 54b2afcf7..f35b661eb 100644
--- a/extensions/TrackingFlags/lib/Flag.pm
+++ b/extensions/TrackingFlags/lib/Flag.pm
@@ -186,10 +186,15 @@ sub match {
$params->{'id'} = \@flag_ids;
}
- my $flags = $class->SUPER::match(@_);
+ # We need to return inactive flags if a value has been set
+ my $is_active_filter = delete $params->{is_active};
+ my $flags = $class->SUPER::match($params);
preload_all_the_things($flags, { bug_id => $bug_id });
+ if ($is_active_filter) {
+ $flags = [ grep { $_->is_active || exists $_->{bug_flag} } @$flags ];
+ }
return [ sort { $a->sortkey <=> $b->sortkey } @$flags ];
}