Bug 25033: (follow-up) Don't limit suggestions to branches if displaying by branch
authorNick Clemens <nick@bywatersolutions.com>
Mon, 24 Aug 2020 12:26:04 +0000 (12:26 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 Aug 2020 09:31:42 +0000 (11:31 +0200)
In the case of organizing by branches we should not filter by branch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
suggestion/suggestion.pl

index 48527ae..bd4c1a0 100755 (executable)
@@ -355,7 +355,7 @@ if ($op=~/else/) {
         }
         my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne "";
 
-        next if ( $definedvalue && $$suggestion_ref{$displayby} ne $criteriumvalue ) and ($displayby ne 'branchcode' or $branchfilter ne '__ANY__' );
+        next if ( $definedvalue && $$suggestion_ref{$displayby} ne $criteriumvalue ) and ($displayby ne 'branchcode' && $branchfilter ne '__ANY__' );
         $$suggestion_ref{$displayby} = $criteriumvalue;
 
         my $suggestions = &SearchSuggestion({ %$suggestion_ref, archived => $filter_archived });