Bugzilla – Attachment 184419 Details for
Bug 40367
Improve display of messages on patron account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40367: Improve display of messages on patron account
Bug-40367-Improve-display-of-messages-on-patron-ac.patch (text/plain), 3.96 KB, created by
David Nind
on 2025-07-18 23:29:43 UTC
(
hide
)
Description:
Bug 40367: Improve display of messages on patron account
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-07-18 23:29:43 UTC
Size:
3.96 KB
patch
obsolete
>From fa64b60d6fca453a7f93f9b5c4b1c728425b0a34 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 16 Jul 2025 10:10:21 -0400 >Subject: [PATCH] Bug 40367: Improve display of messages on patron account > >When displaying messages on a patron account, group the messages by >type and label which are OPAC messages and which are internal staff >messages. > >To test: >1. Find a patron and add several messages to their account, alternating > between internal staff messages and OPAC messages >--> Note that the messages display in the order that they are added and > not explicitly labeled >2. Apply patch and refresh page >--> Confirm that all staff messages display first and all OPAC messages > display underneath >--> Confirm that messages are now labeled "Staff note" or "OPAC" >3. Play around on the patron account and confirm that the message > display is consistent after taking different actions: > - On the Details page > - On the Check out page > - After adding a new staff message > - After adding a new OPAC message > >Signed-off-by: David Nind <david@davidnind.com> >--- > circ/circulation.pl | 7 ++++--- > .../intranet-tmpl/prog/en/includes/patron_messages.inc | 3 +++ > members/moremember.pl | 7 ++++--- > 3 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 5d432b4f809..132c947f8de 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -695,9 +695,10 @@ if ($patron) { > my $patron_messages = $patron->messages->search( > {}, > { >- join => 'manager', >- '+select' => [ 'manager.surname', 'manager.firstname' ], >- '+as' => [ 'manager_surname', 'manager_firstname' ], >+ join => 'manager', >+ '+select' => [ 'manager.surname', 'manager.firstname' ], >+ '+as' => [ 'manager_surname', 'manager_firstname' ], >+ 'order_by' => { -desc => 'me.message_type' }, > } > ); > $template->param( patron_messages => $patron_messages ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index 942993dde70..25e05462e93 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -327,12 +327,15 @@ > [% FOREACH patron_message IN patron_messages %] > <li> > [% SET span_class = '' %] >+ [% SET msg_type = 'OPAC' %] > [% IF(patron_message.message_type == "L") %] > [% span_class = 'circ-hlt' %] >+ [% msg_type = 'Staff note' %] > [% END %] > <span class="[% span_class | html %]"> > [% patron_message.message_date | $KohaDates %] > [% Branches.GetName( patron_message.branchcode ) | html %] >+ - [% t(msg_type) | html %] > [% IF patron_message.manager_id %] > ( > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron_message.manager_id | uri %]" >diff --git a/members/moremember.pl b/members/moremember.pl >index 2c7a32b88b2..789cbeaa3a5 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -182,9 +182,10 @@ my $patron_messages = Koha::Patron::Messages->search( > 'me.borrowernumber' => $patron->borrowernumber, > }, > { >- join => 'manager', >- '+select' => [ 'manager.surname', 'manager.firstname' ], >- '+as' => [ 'manager_surname', 'manager_firstname' ], >+ join => 'manager', >+ '+select' => [ 'manager.surname', 'manager.firstname' ], >+ '+as' => [ 'manager_surname', 'manager_firstname' ], >+ 'order_by' => { -desc => 'me.message_type' }, > } > ); > >-- >2.39.5
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 40367
:
184153
|
184419
|
184673