Bug 9175

Summary: Shelving location search returns no results
Product: Koha Reporter: Jason Etheridge <jason>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: dcook, katrin.fischer, tomascohen
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8266
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Jason Etheridge 2012-11-29 21:12:28 UTC
Consider these two searches:

Keyword: harry potter
Shelving location limit: Juvenile DVDs

http://catalog.bywatersolutions.com/cgi-bin/koha/opac-search.pl?idx=kw&q=harry+potter&op=and&idx=kw&op=and&idx=kw&limit=mc-loc%3AJDVD&sort_by=relevance&do=Search

Returns 4 results

and

Keyword: harry hotter
Shelving location: Juvenile DVDs

http://catalog.bywatersolutions.com/cgi-bin/koha/opac-search.pl?idx=kw&q=harry+potter&op=and&idx=location&q=Juvenile+DVDs&op=and&idx=kw&do=Search&sort_by=relevance

Returns 0 results.  I'd expect the same four results.

Seeing that first query converted the label Juvenile DVDs to a code of JDVD, I try to use that identifier instead:

Keyword: harry potter
Shelving location: JDVD

http://catalog.bywatersolutions.com/cgi-bin/koha/opac-search.pl?idx=kw&q=harry+potter&op=and&idx=location&q=JDVD&op=and&idx=kw&do=Search&sort_by=relevance

Returns 0 results
Comment 1 Katrin Fischer 2014-11-02 09:53:36 UTC
This is still valid. The shelving location search in advanced staff search will only work correctly if searching with the code.
Comment 2 David Cook 2019-02-21 00:20:35 UTC
(In reply to Katrin Fischer from comment #1)
> This is still valid. The shelving location search in advanced staff search
> will only work correctly if searching with the code.

I think there might be a different problem at work here, but it's too old to really troubleshoot this one with the original reporter I think?
Comment 3 Katrin Fischer 2019-02-21 04:22:01 UTC
This one is actually resoved: We used to have shelving location as an option in the pull down that only worked with the codes. As this was confusing, the option was since removed. Now only the checkboxes are offered.

If you look closely you see the difference in the search URL and how the original reporter made the difference between 'shelving location limit' (checkboxes) and 'shelving location' (pull own)
Comment 4 David Cook 2019-02-21 06:12:44 UTC
(In reply to Katrin Fischer from comment #3)
> This one is actually resoved: We used to have shelving location as an option
> in the pull down that only worked with the codes. As this was confusing, the
> option was since removed. Now only the checkboxes are offered.
> 

This makes me very happy. The "Shelving Location" option in the pulldown was an endless source of complaints.

> If you look closely you see the difference in the search URL and how the
> original reporter made the difference between 'shelving location limit'
> (checkboxes) and 'shelving location' (pull own)

Yeah, I noticed that, and thought that was interesting. Although the 1st and 3rd URL both used the LOC code. I was surprised that the 3rd URL got no results, but figured it was just not handling the location in the same way as a limit mc-loc would, since they are different bits of build_query code...