Koha-clms/t/Koha
David Cook 474148538f
Bug 14007: Filter search result values to remove OpacHiddenItems values
This change filters the values from the OpacHiddenItems syspref
out of their corresponding search results facets.

Note: This does not mean that all values from hidden items are filtered out of facets.
Rather, it just means that facet data that matches OpacHiddenItems is filtered out. This is
an imperfect fix, but it is a practical fix that has been requested by more than one library.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
2. Add an item with an item type of "Maps"
3. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems
4. Fill in OpacHiddenItems with the following:
itype: ['MP']
5. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
6. Note that "Maps" does not appear in the "Item types" facet
7. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
8. Note that "Maps" does appear in the "Item types" facet

9. ***Repeat this test plan using both Elasticsearch and Zebra indexing***

10. prove -v t/Koha/SearchEngine/Search.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 16:41:39 +02:00
..
Auth Bug 13888: 'Lists' permission should allow/disallow using the lists module in staff 2024-07-22 09:57:04 +01:00
Authority
…
Database
…
DateTime/Format Bug 36486: Fix file perms and tidiness 2024-05-10 16:45:49 +02:00
I18N/po/xx_XX/LC_MESSAGES
…
Installer Bug 35681: Add Koha::Installer::Output 2024-05-02 16:47:40 +02:00
Middleware Bug 33967: Add unit test to ensure SetEnv doesn't compromise $env 2023-06-09 08:50:13 -03:00
Object
…
Plugins
…
REST/Plugin Bug 37389: Add tests 2024-08-02 18:59:53 +02:00
Result
…
SearchEngine Bug 14007: Filter search result values to remove OpacHiddenItems values 2024-10-25 16:41:39 +02:00
Util
…
Config.t Bug 31393: Tidy 2023-10-30 09:02:18 -03:00
Email.t Bug 31627: (follow-up) Update -Id to -ID 2024-05-10 14:11:50 +02:00
Exceptions.t Bug 35248: Add test for Koha::Exceptions::Booking 2024-03-15 09:38:46 +01:00
I18N.t
…
ItemType.t
…
Script.t
…
Script_cron.t
…
Z3950responder.t
…
sleep.pl
…
wait.pl
…