Bugzilla – Attachment 144498 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.22 KB, created by
Matthias Meusburger
on 2022-12-08 14:13:53 UTC
(
hide
)
Description:
Bug 32431: Display expiry date on SIP checkout when patron is expired
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2022-12-08 14:13:53 UTC
Size:
2.22 KB
patch
obsolete
>From 7b435a7f862b187fdf1890437f28b918f7aa9761 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 >--- > 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