Bugzilla – Attachment 139688 Details for
Bug 25816
Add OPAC messages in SIP display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25816: Add opac messages in SIP display.
Bug-25816-Add-opac-messages-in-SIP-display.patch (text/plain), 1.74 KB, created by
Martin Renvoize (ashimema)
on 2022-08-23 15:10:47 UTC
(
hide
)
Description:
Bug 25816: Add opac messages in SIP display.
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-08-23 15:10:47 UTC
Size:
1.74 KB
patch
obsolete
>From 031888f35cd6c49f9a38c74a2c277a33d425eb93 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 11 Sep 2019 11:39:31 +0200 >Subject: [PATCH] Bug 25816: Add opac messages in SIP display. > >Test plan: > > - Add one or more opac messages to a patron > (patron detail -> add message -> Add a message for: OPAC) > > - Check that the messages will be displayed, with correctly formatted dates. > >You can use src/C4/SIP/interactive_patron_dump.pl for easier testing. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/SIP/ILS/Patron.pm | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index f0320bc720..15246acd57 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -26,6 +26,8 @@ use C4::Auth qw(checkpw); > use Koha::Items; > use Koha::Libraries; > use Koha::Patrons; >+use Koha::Patron::Messages; >+use Koha::DateUtils; > > our $kp; # koha patron > >@@ -154,6 +156,22 @@ sub new { > } > } > >+ my @patron_messages = Koha::Patron::Messages->search( >+ { >+ borrowernumber => $kp->{borrowernumber}, >+ message_type => 'B', >+ } >+ ); >+ my @messages_array; >+ foreach my $message (@patron_messages) { >+ my $messagedt = dt_from_string( $message->message_date, 'iso' ); >+ my $formatted_date = output_pref({ dt => $messagedt, dateonly => 1}); >+ push @messages_array, $formatted_date . ": " . $message->message; >+ } >+ if (@messages_array) { >+ $ilspatron{screen_msg} .= ". Messages for you: " . join(' / ', @messages_array); >+ } >+ > # FIXME: populate fine_items recall_items > $ilspatron{unavail_holds} = _get_outstanding_holds($kp->{borrowernumber}); > >-- >2.20.1
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 25816
:
106060
|
139688
|
154545
|
155592
|
155596