Bugzilla – Attachment 106060 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.68 KB, created by
Matthias Meusburger
on 2020-06-19 09:32:41 UTC
(
hide
)
Description:
Bug 25816: Add opac messages in SIP display.
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2020-06-19 09:32:41 UTC
Size:
1.68 KB
patch
obsolete
>From c0c1879cb0cea95905c88eed0924bb8237ea9c82 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. >--- > 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 6969c115ed..aa13980e00 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -27,6 +27,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 > >@@ -137,6 +139,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.11.0
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