Bugzilla – Attachment 132652 Details for
Bug 25815
SIP Checkout: add more information on why the patron is blocked
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25815: SIP Checkout: add more information on why the patron is blocked.
Bug-25815-SIP-Checkout-add-more-information-on-why.patch (text/plain), 2.84 KB, created by
Biblibre Sandboxes
on 2022-03-30 16:05:32 UTC
(
hide
)
Description:
Bug 25815: SIP Checkout: add more information on why the patron is blocked.
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2022-03-30 16:05:32 UTC
Size:
2.84 KB
patch
obsolete
>From e9ac8e62c113eecd7c5a69f3e1f7baec53044146 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Thu, 17 Oct 2019 10:32:18 +0200 >Subject: [PATCH] Bug 25815: SIP Checkout: add more information on why the > patron is blocked. > >Currently, on SIP checkout, Koha only returns "Patron Blocked" when there is >a problem with the patron. > >This patch adds more specific informations, with the following messages: > > - "Patron expired" > - "Patron debarred" > - "Patron has fines" (see system preference "noissuescharge") > - "Patron blocked" (see system preference "OverduesBlockCirc") > >Test plan: > > - Try to do a SIP checkout with a patron that is in one of the above situations. > - Check that the displayed message matches the patron's situation. > >Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr> >--- > C4/SIP/ILS.pm | 12 +++++++++--- > C4/SIP/ILS/Patron.pm | 4 ++++ > 2 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 145fe89aac..f24c8d8d2f 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -123,7 +123,6 @@ sub offline_ok { > sub checkout { > my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account ) = @_; > my ( $patron, $item, $circ ); >- > $circ = C4::SIP::ILS::Transaction::Checkout->new(); > > # BEGIN TRANSACTION >@@ -132,12 +131,19 @@ sub checkout { > if ($fee_ack) { > $circ->fee_ack($fee_ack); > } >- > if ( !$patron ) { > $circ->screen_msg("Invalid Patron"); > } > elsif ( !$patron->charge_ok ) { >- $circ->screen_msg("Patron Blocked"); >+ if ($patron->expired) { >+ $circ->screen_msg("Patron expired"); >+ } elsif ($patron->debarred) { >+ $circ->screen_msg("Patron debarred"); >+ } elsif ($patron->fine_blocked) { >+ $circ->screen_msg("Patron has fines"); >+ } else { >+ $circ->screen_msg("Patron blocked"); >+ } > } > elsif ( !$item ) { > $circ->screen_msg("Invalid Item"); >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 95166d3da8..7d77b7e9be 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -126,7 +126,9 @@ sub new { > recall_items => [], > unavail_holds => [], > inet => ( !$debarred && !$expired ), >+ debarred => $debarred, > expired => $expired, >+ fine_blocked => $fine_blocked, > fee_limit => $fee_limit, > userid => $kp->{userid}, > ); >@@ -181,6 +183,8 @@ my %fields = ( > birthdate_iso => 0, > dateexpiry => 0, > dateexpiry_iso => 0, >+ debarred => 0, >+ fine_blocked => 0, > ptype => 0, > charge_ok => 0, # for patron_status[0] (inverted) > renew_ok => 0, # for patron_status[1] (inverted) >-- >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 25815
:
106059
|
132652
|
133215
|
133397
|
155593