Bug 30636: Show notforloan availability correctly in ILS-DI
authorDavid Cook <dcook@prosentient.com.au>
Thu, 28 Apr 2022 05:48:33 +0000 (05:48 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 6 Jun 2022 16:04:37 +0000 (13:04 -0300)
commit3b0505247ac358067a14a8b2edba087f212daad5
tree3e9ca281d2f433bac63206d44c33778f0ad36907
parent71f54a75713c5d5a6acfbdd3fefe1166ea0efafd
Bug 30636: Show notforloan availability correctly in ILS-DI

This patch adds the Koha::Item->is_notforloan() method which checks
the item status of "notforloan" and it checks the effective item type
to see if it's marked as "notforloan". This change brings ILS-DI in line
with the catalogue which displays "Not for loan" for both those scenarios.

0. Don't apply patch yet
1. Enable ILS-DI system preference
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
2. Change Item types to "Not for Loan" for Books
http://localhost:8081/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
3. Note that book is listed as "Not for loan" in catalogue
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29&searchid=scs_1651115075364
4. Note that book is listed as "available" via ILS-DI
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=29&id_type=bib

5. Apply patch and restart starman (ie koha-plack --restart kohadev)

6. Note that book is listed as "not available" and "Not for loan" via ILS-DI
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=29&id_type=bib

--

7. prove t/db_dependent/Koha/Item.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/ILSDI/Services.pm
Koha/Item.pm
t/db_dependent/Koha/Item.t