Bugzilla – Attachment 132656 Details for
Bug 30118
holds_block_checkin behavior is different in Koha and in SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.
Bug-30118-Make-holdsblockcheckin-in-SIP-behave-lik.patch (text/plain), 2.22 KB, created by
Kyle M Hall (khall)
on 2022-03-30 16:39:19 UTC
(
hide
)
Description:
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-03-30 16:39:19 UTC
Size:
2.22 KB
patch
obsolete
>From 31e90511a6e7b55bbc2b20adf430c00c2a349273 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 17 Mar 2021 14:14:25 +0100 >Subject: [PATCH] Bug 30118: Make holds_block_checkin in SIP behave like in > Koha interface. > >In koha interface, a warning is displayed when an item on hold is returned >only if the return is for this specific item. > >This patch does the same in SIP: the return is blocked when holds_block_checkin >is enabled and there is a hold on a specific item and this is the very item >being returned. > >Test plan: > >The following behavior is expected in SIP: > > - An item is returned, and there is a reservation on record-level: block > - An item is returned, and there is a reservation on this very item: block > - An item is returned, and there is a reservation on another item: allow > >Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/SIP/ILS/Transaction/Checkin.pm | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index a4e09304ac..bba433415e 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -13,7 +13,7 @@ use C4::SIP::ILS::Transaction; > > use C4::Circulation qw( AddReturn LostItem ); > use C4::Items qw( ModItemTransfer ); >-use C4::Reserves qw( ModReserve ModReserveAffect ); >+use C4::Reserves qw( ModReserve ModReserveAffect CheckReserves ); > use Koha::DateUtils qw( dt_from_string ); > use Koha::Items; > >@@ -87,7 +87,14 @@ sub do_checkin { > $messages->{additional_materials} = 1; > } > >- my $checkin_blocked_by_holds = $holds_block_checkin && $item->biblio->holds->count; >+ my $reserved; >+ my $lookahead = C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds >+ my ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); >+ if ( $resfound eq "Reserved") { >+ $reserved = 1; >+ } >+ >+ my $checkin_blocked_by_holds = $holds_block_checkin && $reserved; > > ( $return, $messages, $issue, $borrower ) = > AddReturn( $barcode, $branch, undef, $return_date ) >-- >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 30118
:
130703
|
132626
| 132656 |
132657