[Koha-bugs] [Bug 19704] OPACs most popular feature includes titles hidden by OpacHiddenItems

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 23 02:11:53 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19704

--- Comment #10 from David Cook <dcook at prosentient.com.au> ---
Created attachment 136433
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136433&action=edit
Bug 17904: Make OPAC "Most popular" respect hidden record sysprefs

At the moment, OpacSuppression and OpacHiddenItems don't affect the output
of the OPAC's "Most popular" page.

This patch adds support for the OpacSuppression and OpacHiddenItems system
preferences, so
that items are excluded from the "Most popular" calculation based on the hidden
rules.

Test plan:
0a. Apply patches
0b. koha-plack --restart kohadev
0c. Log into Koha as "koha" user
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacTopissue
2. Enable "OpacTopissue"
3. Go to
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
4. Checkout 39999000001310
5. Checkout 39999000005578
6. Checkout 39999000004571
7. Checkout 39999000005592
8. Go to
http://localhost:8080/cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
9. See 3 titles
10. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems
11. Change "OpacHiddenItems" to the following (within the single quotes):
barcode: [39999000001310,39999000005578]
location: ['RANDOM','THAT','THIS']
12. Go to
http://localhost:8080/cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
13. See 2 titles ("Gairm" is hidden, as is one of the items for "Continuous
delivery /")
14. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItemsExceptions
15. Update the syspref to 'S'
16. Go to
http://localhost:8080/cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
17. See 3 titles again

18. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacSuppression
19. Change syspref to "Hide"
20. Go to
http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=114
21. Change 942$n to "Yes" and save record
22. Go to
http://localhost:8080/cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
23. See 2 titles ("Clean code : a handbook of agile software craftsmanship /
Robert C. Martin ... [et al.]" is suppressed

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list