Bug 23086: Search for collection is broken
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 18 Sep 2019 14:28:33 +0000 (10:28 -0400)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Fri, 18 Sep 2020 20:32:58 +0000 (22:32 +0200)
commitae19b9456a6b974682cad82bb9aa5ea810ec1e86
tree44bf273a1552a44adc000638f01ce8558fdfd23f
parent89feb3e59be59ddb6a0b209820f6f10f27700228
Bug 23086: Search for collection is broken

It appears that we are quoting the ccode values deep in the search code.
Under ICU chains this breaks searching by limits

To recreate
 1 - Setup Koha using Zebra and icuchains
 2 - Add ccode to AdvancedSearchTypes
 3 - In koha-conf.xml set zebra debug level to include request
  <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 4 - Set some items into different ccodes
 5 - On opac perform a search for:
    ccode:NFIC
 6 - It works
 7 - tail -n 50 /var/log/koha/kohadev/zebra-output.log
 8 - Note search request like:
    Search biblios OK 26 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
 9 - On opac go to advanced search, select Collection, and limit to smae code a s above
10 - No results
11 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 'NFIC'
12 - Apply patch
13 - Restart all
14 - Repeat search by collection limit
15 - Success!
16 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
17 - Add a new ccode value: N)N
18 - Set some items to that ccode
19 - Confirm searching by that ccode works

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc1b76be4a35403239fbce6f349ee343435cc8a0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4733a2a4215c9351a398945ea2546542e4027d43)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit fa08592991a875b81f5cc3c6bec555b0e5f866b8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
C4/Search.pm