Bugzilla – Attachment 145553 Details for
Bug 32431
Show date for expired patrons in SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32431: Display expiry date on SIP checkout when patron is expired
Bug-32431-Display-expiry-date-on-SIP-checkout-when.patch (text/plain), 2.33 KB, created by
Kyle M Hall (khall)
on 2023-01-20 18:56:36 UTC
(
hide
)
Description:
Bug 32431: Display expiry date on SIP checkout when patron is expired
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-01-20 18:56:36 UTC
Size:
2.33 KB
patch
obsolete
>From 3b517b18a90149bfd854843a7d34e25d20a61b74 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Thu, 8 Dec 2022 14:10:18 +0000 >Subject: [PATCH] Bug 32431: Display expiry date on SIP checkout when patron is > expired > >Test plan: > > - Set up an expired patron > - Do a SIP checkout > - Check that the message is "Patron expired" > - Apply the patch > - Check that the message is "Patron expired on <correctly_formatted_date>" > - Prove t//db_dependent/SIP/Transaction.t > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/SIP/ILS.pm | 3 ++- > t/db_dependent/SIP/Transaction.t | 4 ++-- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index ff9ee74067..bebeaf6b6d 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -7,6 +7,7 @@ package C4::SIP::ILS; > use warnings; > use strict; > use C4::SIP::Sip qw( siplog ); >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Data::Dumper; > > use C4::SIP::ILS::Item; >@@ -137,7 +138,7 @@ sub checkout { > if ($patron->debarred) { > $circ->screen_msg("Patron debarred"); > } elsif ($patron->expired) { >- $circ->screen_msg("Patron expired"); >+ $circ->screen_msg("Patron expired on " . output_pref({ dt => dt_from_string( $patron->dateexpiry_iso, 'iso' ), dateonly => 1 })); > } elsif ($patron->fine_blocked) { > $circ->screen_msg("Patron has fines"); > } else { >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index e1e15ccb95..ffabc838c1 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -466,12 +466,12 @@ subtest do_checkout_with_patron_blocked => sub { > class => 'Koha::Patrons', > value => { > branchcode => $library->branchcode, >- dateexpiry => '2020/01/01', >+ dateexpiry => '2020/01/03', > } > } > ); > my $circ = $ils->checkout($expired_patron->cardnumber, $item->barcode); >- is( $circ->{screen_msg}, 'Patron expired', "Got correct expired screen message" ); >+ is( $circ->{screen_msg}, 'Patron expired on 01/03/2020', "Got correct expired screen message" ); > > my $fines_patron = $builder->build_object( > { >-- >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 32431
:
144498
|
144545
| 145553