Bugzilla – Attachment 117781 Details for
Bug 27058
Cannot place hold to ordered item when on shelf holds are not allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27058: Make checkout availability use all notforloan reasons
Bug-27058-Make-checkout-availability-use-all-notfo.patch (text/plain), 1.88 KB, created by
Marcel de Rooy
on 2021-03-05 07:35:16 UTC
(
hide
)
Description:
Bug 27058: Make checkout availability use all notforloan reasons
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-03-05 07:35:16 UTC
Size:
1.88 KB
patch
obsolete
>From 057d8f180ed63ccd6c68e041182c3f8036a479a1 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Thu, 19 Nov 2020 16:55:18 +0200 >Subject: [PATCH] Bug 27058: Make checkout availability use all notforloan > reasons >Content-Type: text/plain; charset=utf-8 > >The ItemsAnyAvailableAndNotRestricted function is checking whether an >item can be checked out and it incorrectly only checks the positive >notforloan values when there can be also negative notforloan >values. If notforloan value is not 0 then it means the item cannot be >checked out. In the case of ordered items the value is negative (-1) >and thus before this change the checkout availability was reported >incorrectly. > >To test: > 1) Run prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t > Notice it fails > 2) Apply this patch > 3) Run prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t > Notice it passes now. > >To test via Koha sandbox (Alternatively): > 1) Create circ rule with If all unavailable > 2) Create new biblio > 3) Order a new item to the biblio via acquisitions and set the not > for loan value to Ordered / -1 > 4) Notice you cannot place a hold to the biblio > 5) Apply patch > 6) Notice you can now place a hold to the biblio > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 8efa426d12..75a978b4a6 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1373,7 +1373,7 @@ sub ItemsAnyAvailableAndNotRestricted { > # we can return (end the loop) when first one found: > return 1 > unless $i->itemlost >- || $i->notforloan > 0 >+ || $i->notforloan > || $i->withdrawn > || $i->onloan > || IsItemOnHoldAndFound( $i->id ) >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27058
:
113820
|
113821
|
113822
|
113824
|
113825
|
114203
|
114204
|
114210
|
114211
|
117021
|
117780
| 117781 |
117782
|
117855
|
117864
|
117865