Bugzilla – Attachment 174796 Details for
Bug 38486
No block checkouts are still blocked by fines, checkouts, and blocked item types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38486: For SIP allow noblock checkouts reguardless of normal patron checkout blocks
Bug-38486-For-SIP-allow-noblock-checkouts-reguardl.patch (text/plain), 3.41 KB, created by
Kyle M Hall (khall)
on 2024-11-19 16:16:48 UTC
(
hide
)
Description:
Bug 38486: For SIP allow noblock checkouts reguardless of normal patron checkout blocks
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-11-19 16:16:48 UTC
Size:
3.41 KB
patch
obsolete
>From 286a7c72637ecc4be162aa8c9231c9e723cc4e9e Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 19 Nov 2024 16:10:14 +0000 >Subject: [PATCH] Bug 38486: For SIP allow noblock checkouts reguardless of > normal patron checkout blocks > >The purpose of no block checkouts in SIP is to indicate that the SIP machine has made an offline ( "store and forward" ) transaction. >The patron already has the item. As such, the item must be checked out to the patron or the library risks losing the item do to lack of tracking. >As such, no block checkouts should not be blocked under any circumstances. > >The sub C4::SIP::ILS::Transaction::Checkout::do_checkout already honors this, but it is wrapped by >C4::SIP::ILS::checkout which has additional checks that do not. > >Test Plan: >1) Apply the unit test patch >2) prove t/db_dependent/SIP/Transaction.t will fail >3) Apply the second patch >4) prove t/db_dependent/SIP/Transaction.t will pass! >--- > C4/SIP/ILS.pm | 31 +++++++++++++++++++++++++++---- > 1 file changed, 27 insertions(+), 4 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 3e77abf6023..c84a0d7e4b2 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -132,12 +132,36 @@ sub checkout { > # BEGIN TRANSACTION > $circ->patron( $patron = C4::SIP::ILS::Patron->new($patron_id) ); > $circ->item( $item = C4::SIP::ILS::Item->new($item_id) ); >+ > if ($fee_ack) { > $circ->fee_ack($fee_ack); > } >+ > if ( !$patron ) { > $circ->screen_msg("Invalid Patron"); > } >+ elsif ( !$item ) { >+ $circ->screen_msg("Invalid Item"); >+ } >+ elsif ( $no_block_due_date ) { >+ # A no block due date means we need check this item out to the patron >+ # regardless if fines, restrictions or any other things that would >+ # typically prevent a patron from checking out. >+ # A no block transaction is used for send offline ( store and forward ) >+ # transaction to Koha. The patron already has possesion of the item >+ # so it should be checked out to the patron no matter what. >+ $circ->do_checkout( $account, $no_block_due_date ); >+ >+ $item->{borrowernumber} = $patron_id; >+ $item->{due_date} = $circ->{due}; >+ push( @{ $patron->{items} }, { barcode => $item_id } ); >+ $circ->desensitize( !$item->magnetic_media ); >+ >+ siplog( >+ "LOG_DEBUG", "ILS::Checkout: patron %s has checked out %s via a no block checkout", >+ $patron_id, join( ', ', map { $_->{barcode} } @{ $patron->{items} } ) >+ ); >+ } > elsif ( !$patron->charge_ok ) { > if ($patron->debarred) { > $circ->screen_msg("Patron debarred"); >@@ -157,9 +181,6 @@ sub checkout { > $circ->screen_msg("Patron blocked"); > } > } >- elsif ( !$item ) { >- $circ->screen_msg("Invalid Item"); >- } > elsif ( $item->{borrowernumber} > && !_ci_cardnumber_cmp( $item->{borrowernumber}, $patron->borrowernumber ) ) > { >@@ -169,7 +190,9 @@ sub checkout { > $circ->screen_msg("Item type cannot be checked out at this checkout location"); > } > else { >- $circ->do_checkout($account, $no_block_due_date); >+ # No block checkouts were handled earlier so there is no need >+ # to bass the no block due date here. >+ $circ->do_checkout($account); > if ( $circ->ok ) { > > # If the item is already associated with this patron, then >-- >2.39.5 (Apple Git-154)
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 38486
:
174795
|
174796
|
175263
|
175264
|
175276
|
175277
|
175312
|
175313