Bugzilla – Attachment 146145 Details for
Bug 32878
Make it impossible to renew the item if it has active item level hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32878: Make it impossible to renew the item if it has active item level hold
Bug-32878-Make-it-impossible-to-renew-the-item-if-.patch (text/plain), 1.49 KB, created by
Peter Vashchuk
on 2023-02-03 14:25:26 UTC
(
hide
)
Description:
Bug 32878: Make it impossible to renew the item if it has active item level hold
Filename:
MIME Type:
Creator:
Peter Vashchuk
Created:
2023-02-03 14:25:26 UTC
Size:
1.49 KB
patch
obsolete
>From 844a47ad39f0fbb36cce0116e6f04e6d3c344ade Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Fri, 3 Feb 2023 16:22:30 +0200 >Subject: [PATCH] Bug 32878: Make it impossible to renew the item if it has > active item level hold > >introduced in: >73c3c5d2f10751c23156372300239d42e5957c66 >Bug 31112: (QA follow-up) Reduce database queries > >started from: >8ba1a9a5345310c54d9225049d470544b56eeb11 >Bug 31112: Remove unnecessary if-clause > >Currently, you can renew the item even if someone already made an item level >hold on that item. This patch changes that, making it not possible to do so. > >To reproduce: >1. Checkout an item, and make another item level hold on that specific item. >2. Renew it using the "Renew" checkbox, it should get renewed without any problems. >3. Apply the patch. >4. Checkbox should be gone and replaced with "On Hold" link that leads to the hold that doesn't allow you to renew the item again. >5. "Renew all" button should not work either. >--- > C4/Circulation.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 6fcd491820..1903fd2f17 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2954,6 +2954,10 @@ sub CanBookBeRenewed { > } > } > >+ # There is an item level hold on this item, no other item can fill the hold >+ return ( 0, "on_reserve" ) >+ if ( $item->current_holds->count ); >+ > my $fillable_holds = Koha::Holds->search( > { > biblionumber => $item->biblionumber, >-- >2.38.1
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 32878
:
146145
|
146166
|
146740
|
146741
|
146742
|
146830
|
146833
|
146834
|
146835
|
148220
|
148223