This patch affects only the area displayed on Advanced Search
by setting the AdvancedSearchTypes OPAC system preference
accordingly. Prior to this patch, no filtering based on
OpacHiddenItems was done. This patch determines if itemtypes,
collections, or shelving locations are hidden and prevents
them from being shown.
TEST PLAN
---------
1) Back up your DB (always handy)
2) Set the Searching system preference AdvancedSearchTypes to:
'itemtypes|ccode|loc' (without the single quotes).
3) Set the OPAC system preference OpacHiddenItems to include the
lines:
itype: [{list of itemtype codes separated by commas}]
location: [{list of comma delimited shelving location codes}]
ccode: [{list of comma delimited collection codes}]
Make sure to exclude one value for each, so there will be at
least one known thing on each tab.
4) Open the OPAC.
5) Click on 'Advanced Search'
-- three tabs appear: Itemtypes, Collection, Shelving location
-- Everything is visible
6) Set the Searching system preference AdvancedSearchTypes to:
'itemtypes | ccode | loc' (without the single quotes).
7) Refresh the OPAC.
-- There will be three tabs, but ugliness ensues.
8) Apply the patch
9) Refresh the OPAC.
-- You will see: Itemtypes, Collection, Shelving location
-- Only excluded values from OpacHiddenItems will be seen.
10) Run koha qa test tools
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Small rewording in comment only.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>