Bugzilla – Attachment 106936 Details for
Bug 23086
Search for collection is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23086: Search for collection is broken
Bug-23086-Search-for-collection-is-broken.patch (text/plain), 2.13 KB, created by
Nick Clemens (kidclamp)
on 2020-07-15 15:50:04 UTC
(
hide
)
Description:
Bug 23086: Search for collection is broken
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-07-15 15:50:04 UTC
Size:
2.13 KB
patch
obsolete
>From ed5031cf4c399d664518d54baa6f493e330cb122 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 18 Sep 2019 10:28:33 -0400 >Subject: [PATCH] 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 >--- > C4/Search.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index a9448e483b..bd4953e67b 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1264,7 +1264,6 @@ See verbose embedded documentation. > > sub buildQuery { > my ( $operators, $operands, $indexes, $limits, $sort_by, $scan, $lang) = @_; >- > warn "---------\nEnter buildQuery\n---------" if $DEBUG; > > my $query_desc; >@@ -1534,7 +1533,7 @@ sub buildQuery { > if ( $k !~ /mc-i(tem)?type/ ) { > # in case the mc-ccode value has complicating chars like ()'s inside it we wrap in quotes > $this_limit =~ tr/"//d; >- $this_limit = $k.":'".$v."'"; >+ $this_limit = $k.':"'.$v.'"'; > } > > $group_OR_limits{$k} .= " or " if $group_OR_limits{$k}; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23086
:
92940
|
106664
|
106668
|
106855
|
106935
|
106936
|
107055
|
107056
|
107355
|
107356