Bugzilla – Attachment 182753 Details for
Bug 39977
Prevent reserves of items the users have already on their possession
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39977 - Prevent reserves of items the users have already on their possession This patch preventes users from placing a hold on item they haved checked out.
Bug-39977---Prevent-reserves-of-items-the-users-ha.patch (text/plain), 1.40 KB, created by
Adolfo RodrÃguez Taboada
on 2025-05-23 08:05:31 UTC
(
hide
)
Description:
Bug 39977 - Prevent reserves of items the users have already on their possession This patch preventes users from placing a hold on item they haved checked out.
Filename:
MIME Type:
Creator:
Adolfo RodrÃguez Taboada
Created:
2025-05-23 08:05:31 UTC
Size:
1.40 KB
patch
obsolete
>From 291ed5a957e70e06e30d30d74b2c62b17f2dceea Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Adolfo=20Rodr=C3=ADguez?= <adolfo.rodriguez@xercode.es> >Date: Fri, 23 May 2025 10:04:24 +0200 >Subject: [PATCH] Bug 39977 - Prevent reserves of items the users have already > on their possession This patch preventes users from placing a hold on item > they haved checked out. > >1 Turn system preference AllowHoldsOnPatronsPossessions to Allow. >2 Check out an item from a record with more than one item. >3 Try to put a hold on that record with the same user that checked out the item. You will see that you can select the item the user already has. >4 Apply patch, restart services >5 Repeat step 3. Now you cannot select the item the user has checked out. >--- > C4/Reserves.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index cadd4d413e..26c99b4dbf 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -512,6 +512,11 @@ sub CanItemBeReserved { > && C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $item->biblionumber ) ) > { > return _cache { status => 'alreadypossession' }; >+ } elsif($item && $patron) { >+ my $issue = $item->checkout; >+ if ($issue && $issue->borrowernumber == $patron->borrowernumber) { >+ return _cache { status => 'alreadypossession' }; >+ } > } > > # check if a recall exists on this item from this borrower >-- >2.30.2
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 39977
: 182753