Bug 21962: Fix authority search using 'all'
authorNick Clemens <nick@bywatersolutions.com>
Thu, 6 Dec 2018 12:42:45 +0000 (12:42 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 11 Dec 2018 19:15:39 +0000 (19:15 +0000)
To test:
1 - Set search engine to Zebra
2 - Have some authorities and indexes up to date
3 - Search authorities with option 'search entire record'
4 - No results
5 - Apply patch
6 - Run unit tests, they pass!
7 - Repeat search
8 - Results!

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/AuthoritiesMarc.pm

index 780380e..10c67fc 100644 (file)
@@ -163,6 +163,9 @@ sub SearchAuthorities {
                 elsif ( @$tags[$i] eq "thesaurus" ) {
                     $attr = " \@attr 1=Subject-heading-thesaurus ";
                 }
+                elsif ( @$tags[$i] eq "all" ) {
+                    $attr = " \@attr 1=Any ";
+                }
                 else {    # Use the index passed in params
                     $attr = " \@attr 1=" . @$tags[$i] . " ";
                 }