Bugzilla – Attachment 131584 Details for
Bug 23669
Verify if checkouts or reserves requests from ILS-DI periods overlap with existing reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23669 : Add overlap reserve check in ILS-DI HoldTitle and HoldItem
Bug-23669--Add-overlap-reserve-check-in-ILS-DI-Hol.patch (text/plain), 2.07 KB, created by
Arthur Suzuki
on 2022-03-11 09:33:33 UTC
(
hide
)
Description:
Bug 23669 : Add overlap reserve check in ILS-DI HoldTitle and HoldItem
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2022-03-11 09:33:33 UTC
Size:
2.07 KB
patch
obsolete
>From 2e87613c8b137c4d6d1af8e40311a58c5a842d42 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 8 Nov 2019 10:22:09 +0100 >Subject: [PATCH] Bug 23669 : Add overlap reserve check in ILS-DI HoldTitle and > HoldItem > >Test plan : >- set PreventReservesOnSamePeriod >- put a first reserve on an item >- try to put another reserve from ILS-DI >- the second reserve should succeed although PreventReservesOnSamePeriod is set. >- apply patch and repeat the process, the second reserve should not succeed >--- > C4/ILSDI/Services.pm | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 52585ac2dd..3536c20290 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -25,7 +25,7 @@ use C4::Items qw( get_hostitemnumbers_of ); > use C4::Circulation qw( CanBookBeRenewed barcodedecode CanBookBeIssued AddRenewal ); > use C4::Accounts; > use C4::Biblio qw( GetMarcBiblio ); >-use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved ); >+use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved ReservesOnSamePeriod); > use C4::Context; > use C4::Auth; > use CGI qw ( -utf8 ); >@@ -785,6 +785,10 @@ sub HoldTitle { > $expdate = $cgi->param('expiry_date'); > } > >+ if (C4::Context->preference('PreventReservesOnSamePeriod') && ReservesOnSamePeriod($biblionumber, undef, $resdate, $expdate)) { >+ return { code => 'NotHoldable' }; >+ } >+ > # Add the reserve > # $branch, $borrowernumber, $biblionumber, > # $constraint, $bibitems, $priority, $resdate, $expdate, $notes, >@@ -887,6 +891,10 @@ sub HoldItem { > $expdate = $cgi->param('expiry_date'); > } > >+ if (C4::Context->preference('PreventReservesOnSamePeriod') && ReservesOnSamePeriod($biblionumber, $itemnumber, $resdate, $expdate)) { >+ return { code => 'NotHoldable' }; >+ } >+ > # Add the reserve > my $priority = C4::Reserves::CalculatePriority($biblionumber); > AddReserve( >-- >2.35.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 23669
: 131584