Bug 17632

Summary: Branch facets in opac do not respect OPAC_SEARCH_LIMIT.
Product: Koha Reporter: Barton Chittenden <barton>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Barton Chittenden 2016-11-15 15:16:15 UTC
I think this is similar to

Bug 12848   : Hotlinked searches from detailed record does not respect OPAC_SEARCH_LIMIT.

Here's an excerpt from the apache config for each opac URL:

ACLL:

   ServerName acll.bywatersolutions.com
   SetEnv OPAC_SEARCH_LIMIT branch:ACLL
   RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT branch:ACLL"

CCCLL:

   ServerName catalog.cccpllib.org
   ServerAlias ccll.acll.bywatersolutions.com
   SetEnv OPAC_SEARCH_LIMIT branch:CCCLL
   RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT branch:CCCLL"

And here are the branch groups:

select branchcode, branchname, branchrelations.categorycode from branches inner join branchrelations using (branchcode) order by categorycode, branchcode;
+------------+------------------------------------------------+--------------+
| branchcode | branchname                                     | categorycode |
+------------+------------------------------------------------+--------------+
| Computer   | Computer Use Only - Alameda County Law Library | ACLL         |
| DUB        | Dublin Satellite Location                      | ACLL         |
| Hay        | Hayward Branch                                 | ACLL         |
| Oak        | Oakland                                        | ACLL         |
| MAR        | Martinez                                       | CCCLL        |
| PIT        | Pittsburg Branch                               | CCCLL        |
| RICH       | Richmond Branch                                | CCCLL        |
+------------+------------------------------------------------+--------------+

The following search is from the acll.bywatersolutions.com domain, i.e. it should only be returning search results for the branches 'Computer', 'DUB', 'Hay' and 'Oak', but the branch 'Martinez' (i.e MAR) is showing in the "Holding libraries" facet.

http://acll.bywatersolutions.com/cgi-bin/koha/opac-search.pl?idx=su%2Cphr&amp;q=ethics
Comment 1 Barton Chittenden 2016-11-15 15:51:11 UTC
Looking back at this, I think that it may simply be an instance of Bug 12848 -- that's where the initial URL came from.

I do wonder whether OPAC_SEARCH_LIMIT should be implimented by injecting the branch limits into the URL if they don't already exist.
Comment 2 Katrin Fischer 2020-01-11 16:34:51 UTC

*** This bug has been marked as a duplicate of bug 12848 ***