Summary: | Scoping OPACs by branch does not work with new library groups | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | OPAC | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, jesse, jonathan.druart, josef.moravec, kyle.m.hall, m.de.rooy, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 21910 | ||
Bug Blocks: | |||
Attachments: |
Bug 21911: Fix OPAC scoping to work with new group system
Bug 21911: Fix OPAC scoping to work with new group system Bug 21911: Regression test Bug 21911: Fix OPAC scoping to work with new group system Bug 21911: Regression test |
Description
Nick Clemens (kidclamp)
2018-11-29 14:17:27 UTC
Created attachment 82743 [details] [review] Bug 21911: Fix OPAC scoping to work with new group system To test: 0 - Apply patch 1 - Create a library group enabled for opac search limits and add some libraries 2 - Check the DB (or advanced search dropdown) to get the id of the group (using 7 as example below) 3 - Add to apache configuration (OPAC virtualhost) SetEnv OPAC_SEARCH_LIMIT branch:multibranchlimit-7 SetEnv OPAC_LIMIT_OVERRIDE 1 RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT branch:multibranchlimit-7" RequestHeader add X-Koha-SetEnv "OPAC_LIMIT_OVERRIDE 1" 4 - Ensure OpacAddMastheadLibraryPulldown is disabled 5 - Restart all the things 6 - Visit the opac 7 - Perform a search, confirm it is scoped to the branches in the group Created attachment 82754 [details] [review] Bug 21911: Fix OPAC scoping to work with new group system To test: 0 - Apply patch 1 - Create a library group enabled for opac search limits and add some libraries 2 - Check the DB (or advanced search dropdown) to get the id of the group (using 7 as example below) 3 - Add to apache configuration (OPAC virtualhost) SetEnv OPAC_SEARCH_LIMIT branch:multibranchlimit-7 SetEnv OPAC_LIMIT_OVERRIDE 1 RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT branch:multibranchlimit-7" RequestHeader add X-Koha-SetEnv "OPAC_LIMIT_OVERRIDE 1" 4 - Ensure OpacAddMastheadLibraryPulldown is disabled 5 - Restart all the things 6 - Visit the opac 7 - Perform a search, confirm it is scoped to the branches in the group Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works as expected, Signing off.. With my QA hat on, it would be lovely to have a regression test for this. Created attachment 82767 [details] [review] Bug 21911: Regression test This tests usuall cases, but note, that administrator could make a branch with code "%%%" or so, which this test does not cover, and some functionalities will not work in that case: opac limit override, holdinbranch facet The problem is a bit wider a think: It is possible ta create a library with code "%%%" for example - it is weird, but you can do it. Then this will not work again... even facets does not work with these kind of library codes.... Created attachment 82949 [details] [review] Bug 21911: Fix OPAC scoping to work with new group system To test: 0 - Apply patch 1 - Create a library group enabled for opac search limits and add some libraries 2 - Check the DB (or advanced search dropdown) to get the id of the group (using 7 as example below) 3 - Add to apache configuration (OPAC virtualhost) SetEnv OPAC_SEARCH_LIMIT branch:multibranchlimit-7 SetEnv OPAC_LIMIT_OVERRIDE 1 RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT branch:multibranchlimit-7" RequestHeader add X-Koha-SetEnv "OPAC_LIMIT_OVERRIDE 1" 4 - Ensure OpacAddMastheadLibraryPulldown is disabled 5 - Restart all the things 6 - Visit the opac 7 - Perform a search, confirm it is scoped to the branches in the group Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 82950 [details] [review] Bug 21911: Regression test This tests usuall cases, but note, that administrator could make a branch with code "%%%" or so, which this test does not cover, and some functionalities will not work in that case: opac limit override, holdinbranch facet Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.01 Pushed to 18.05.x for 18.05.07 Depends on Bug 21910 not in 17.11.x *** Bug 17683 has been marked as a duplicate of this bug. *** |