Bug 16979 - Search for barcode containing parentheses fails
Summary: Search for barcode containing parentheses fails
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Zebra (show other bugs)
Version: 16.05
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-26 15:27 UTC by John Yorio
Modified: 2020-01-11 14:48 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Yorio 2016-07-26 15:27:34 UTC
Searching for a call number containing parentheses,  similar to:

1234567890 (text)

or

1234(5678)90 

fails to return any results, either in the staff interface or OPAC.

For the first barcode, leaving off "(text)" will return the expected result, but removing the parentheses from the latter still does not.

The issue (and I suspect the solution) seems similar to 15468 and 12405 in that, if I modify the URL to include %22 around the barcode, I get the expected result.

To reproduce :

1) Set up an item with a barcode with the form: 1234567890 (text)
2) In the staff interface, perform a barcode search for the exact barcode
3) No results are returned
4) Modify the search URL to include %22 around barcode
     e.g.: .../cgi-bin/koha/catalogue/search.pl?idx=bc&q=1234567890+(text)&op=and&idx=kw&op=and&idx=kw&sort_by=relevance
     becomes: cgi-bin/koha/catalogue/search.pl?idx=bc&q=%221234567890+(text)%22&op=and&idx=kw&op=and&idx=kw&sort_by=relevance
5) Press enter
6) The expected result is returned

7) Setup an item with a barcode with the form: 1234(5678)90
8) In the staff interface, perform a barcode search for the exact barcode
9) No results are returned
10) Modify the result URL to include %22 around barcode
     e.g. .../cgi-bin/koha/catalogue/search.pl?idx=bc&q=1234(5678)90&op=and&idx=kw&op=and&idx=kw&sort_by=relevance
     becomes: .../cgi-bin/koha/catalogue/search.pl?idx=bc&q=%221234(5678)90%22&op=and&idx=kw&op=and&idx=kw&sort_by=relevance
11) Press enter
12) The expected result is returned