]> 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)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Mon, 1 Feb 2021 22:55:01 +0000 (23:55 +0100)
commit39669592997f7b19ca8983547a724f29b0fad3cf
tree609324959817fd245f593fdd9796dbea6cc5c177
parentd446cb427cb02a0ca0ea3e08bf1c81f8f2a42242
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>
(cherry picked from commit 284b2da589aabb2475b1292b1cf843be818b384e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 41605172eaebee255876abc21e1607a92cf21b4b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
opac/opac-reserve.pl