Bug 28286: show "Place hold" button if item is holdable
authorPetro Vashchuk <stalkernoid@gmail.com>
Wed, 5 May 2021 13:30:26 +0000 (16:30 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 12 May 2021 14:41:57 +0000 (16:41 +0200)
commit8e743d48144b6fa645c46bf9d27f696ff4cdec56
treef671bf0dc617bfc734e3f99f202b5b651c473120
parentd6c8dcd09e21596e9e442bca3738085ebdf66a85
Bug 28286: show "Place hold" button if item is holdable

This patch adds "filter_by_for_hold" method in "Items.pm" and
uses it in "cat-toolbar.inc" instead of "filter_by_for_load".

Also this patch removes "filter_by_for_loan" method.

To reproduce the bug:
1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has
item with notforloan value set as "Ordered" (-1)
2) see that button "Place hold" is not present
3) apply the patch
4) refresh the page and ensure that "Place hold" button appears even if
item is "Ordered"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 17fbf29d0e369ba0df7c38eca69f7a0a5d159b44)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Items.pm
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
t/db_dependent/Koha/Items.t