Bug 6265

Summary: Search for records linked to an authority not exact in OPAC
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SearchingAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: major    
Priority: PATCH-Sent (DO NOT USE) CC: chris, paul.poulain
Version: 3.4   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=1
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: proposed patch
patch signed-off

Description Katrin Fischer 2011-04-25 19:33:02 UTC
When searching for linked records for an authority in OPAC's authority search the search is not exact.

http://localhost/cgi-bin/koha/opac-search.pl?type=opac&q=1&idx=an

Will bring up all records with an authority number starting with one.

The link in intranet works correctly:

http://localhost:8080/cgi-bin/koha/catalogue/search.pl?type=intranet&op=do_search&idx=an,phr&q=1

Changing the opac link accordingly brings up the right records:

http://localhost/cgi-bin/koha/opac-search.pl?type=opac&q=1&idx=an,phr
Comment 1 Katrin Fischer 2011-04-25 19:56:50 UTC Comment hidden (obsolete)
Comment 2 Paul Poulain 2011-04-28 20:48:06 UTC
Created attachment 4018 [details] [review]
patch signed-off
Comment 3 Chris Cormack 2011-04-28 21:13:02 UTC
Pushed, please test
Comment 4 Paul Poulain 2011-04-29 10:25:06 UTC
comment from hdl:

imho, phr is not really what we would like.
What would best fit is the usage of ext... But that would require a
change in the koha-Auth-Number indexing and reindexing the biblios....
use
elm xxx$9 Koha-Auth-Number:w,Koha-Auth-Number:p,Koha-Auth-Number:n
n declaration should be optionnal.

Which may not be what we want either.
there are other places where this is required and needed
xslt, opac-detail and intranet detail
hope that helps.
Comment 5 Katrin Fischer 2011-05-03 08:21:17 UTC
I copied the search string from intranet to opac, because it worked like I expected it to work in intranet.

The search link is constructed quite differently from other places in Koha, like the XSLT files. So I am not sure more changes are needed. I had tested a search for the author from the OPAC detail page and it seemed to work ok.

This needs more testing, but I think the patch will fix the described problem in OPAC's authority search.