Bugzilla – Attachment 111517 Details for
Bug 26659
An item can be renewed even if there are holds waiting to be filled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26659: Fix incorrect comparison in checkout renewability
Bug-26659-Fix-incorrect-comparison-in-checkout-ren.patch (text/plain), 1.93 KB, created by
Joonas Kylmälä
on 2020-10-12 15:25:17 UTC
(
hide
)
Description:
Bug 26659: Fix incorrect comparison in checkout renewability
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2020-10-12 15:25:17 UTC
Size:
1.93 KB
patch
obsolete
>From a83435b4f44ebcd6cc3083db5ac76c46ea44d11c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Mon, 12 Oct 2020 14:54:37 +0000 >Subject: [PATCH] Bug 26659: Fix incorrect comparison in checkout renewability > >The syntax used here was wrong and it allowed incorrectly to renew >checkouts which should not have been allowed because there were >holds waiting to be filled. This scenario can be reproduced at least >with using local hold groups. > >To test: > >1. In the circ rules for all libraries under "Default holds policy by item type" section > select for itemtype Book the policies "From local hold group" and "patron's hold group" >2. Enable AllowRenewalIfOtherItemsAvailable >3. Create local hold group for branch A and branch B (/cgi-bin/koha/admin/library_groups.pl) >4. Create biblio with 2 items of itemtype Book, one in branch A and other in B >5. Checkout item from branch A to patron PA >6. Create bib level hold for patron PB whose home library is branch A. >7. Try go to renew now the loan for patron PA and notice it would work >8. Apply patch >9. Try to go renew the loan for patron PA and notice it doesn't work. >--- > C4/Circulation.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 2f91511dbd..8f6b0816b1 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2831,7 +2831,7 @@ sub CanBookBeRenewed { > for my $borrowernumber (@borrowernumbers) { > my $patron = $patrons{$borrowernumber} //= Koha::Patrons->find( $borrowernumber ); > next unless IsAvailableForItemLevelRequest($item, $patron); >- next unless CanItemBeReserved($borrowernumber,$itemnumber); >+ next unless CanItemBeReserved($borrowernumber,$itemnumber)->{status} eq 'OK'; > > push @reservable, $itemnumber; > if (@reservable >= @borrowernumbers) { >-- >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 26659
:
111517
|
111522
|
112402