]> git.koha-community.org Git - koha.git/commit
Bug 15448: Filter out items hidden in OPAC on placing hold
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 4 Dec 2020 11:21:36 +0000 (08:21 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 19 Jan 2021 07:46:03 +0000 (08:46 +0100)
commit284b2da589aabb2475b1292b1cf843be818b384e
tree213d5977c6bc24b53f748677674ddd0e2a79d67f
parent8dfeb810900308148a1f48575a8a57e7378e26b5
Bug 15448: Filter out items hidden in OPAC on placing hold

This patch leverages on bug 24254's
Koha::Items->filter_by_visible_in_opac to filter out items that
shouldn't be presented to the end user in the OPAC interface.

To test:
1. Circulation and Fine rules for item-level holds are set to allow.
2. Setting the OpacHiddenItems preference to "ccode: [SUPPRESS]"
3. An item with collection Code Suppress is set.
4. Search for the title in the OPAC.
=> SUCCESS: The Suppress ccode item isn't shown.
5. View the detail page for the title.
=> SUCCESS: The suppress ccode item isn't shown.
6. Place a hold on the item:
  -- Click "Show more options"
  -- Select "A specific item"
=> FAIL: the ccode with the opachiddenitems rule has an item that appear in the list to place a hold
7. Apply this patch and repeat 6
=> SUCCESS: The item doesn't show!
8. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 051f5519861cb2365ddd06d08a9047648af2318b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
opac/opac-reserve.pl