Bug 21962: Fix authority search using 'all'
authorNick Clemens <nick@bywatersolutions.com>
Thu, 6 Dec 2018 12:42:45 +0000 (12:42 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 12 Dec 2018 10:51:22 +0000 (10:51 +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>
(cherry picked from commit 3adf7708d544338250703165fe7e87f2690d8639)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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] . " ";
                 }