Bug 33421: Fix filtering suggestions by status

If the display is by status and a specific status is selected in the
filter, the filter won't have any effects.

Test plan:
Create several suggestions, with different status, for different
libraries.
Use the "display by status" view and filter on a given status
=> Result must be relevant

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-05-10 12:19:13 +02:00 committed by Tomas Cohen Arazi
parent e40bc40c6f
commit ec0ebda77d
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 6 additions and 0 deletions

View File

@ -376,6 +376,12 @@ if ($op=~/else/) {
my @allsuggestions;
foreach my $criteriumvalue ( @criteria_dv ) {
my $search_params = {%$suggestion_ref};
next
if $search_params->{STATUS}
&& $displayby eq 'STATUS'
&& $criteriumvalue ne $search_params->{STATUS};
# By default, display suggestions from current working branch
my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne "";