Bugzilla – Attachment 158703 Details for
Bug 18397
Add recipient/sender information to notices tab in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18397: Add message delivery details to the notices tab
Bug-18397-Add-message-delivery-details-to-the-noti.patch (text/plain), 6.60 KB, created by
Martin Renvoize (ashimema)
on 2023-11-09 08:20:35 UTC
(
hide
)
Description:
Bug 18397: Add message delivery details to the notices tab
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-09 08:20:35 UTC
Size:
6.60 KB
patch
obsolete
>From b09544abc747c34d10673f50540f81738057b874 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 8 Nov 2023 16:41:02 +0000 >Subject: [PATCH] Bug 18397: Add message delivery details to the notices tab > >This patch adds further delivery details to the notices tab in patron >details in the staff client. > >Once a message is sent, we display the 'from:', 'to:' and 'cc:' >addresses in the 'Delivery note' column when they exist. >--- > C4/Letters.pm | 2 +- > .../prog/en/modules/members/notices.tt | 32 ++++++++++++------- > 2 files changed, 21 insertions(+), 13 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 47e12526484..a0404ac7075 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1116,7 +1116,7 @@ sub GetQueuedMessages { > > my $dbh = C4::Context->dbh(); > my $statement = << 'ENDSQL'; >-SELECT message_id, borrowernumber, subject, content, message_transport_type, status, time_queued, updated_on, failure_code >+SELECT message_id, borrowernumber, subject, content, message_transport_type, status, time_queued, updated_on, failure_code, from_address, to_address, cc_address > FROM message_queue > ENDSQL > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >index 26260468033..ce6abe88a7f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >@@ -94,20 +94,28 @@ > <td data-order="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</td> > <td> > [% IF ( QUEUED_MESSAGE.failure_code ) %] >- [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]<span>Invalid borrowernumber [% borrowernumber | html %]</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]<span>Unable to find an email address for this borrower</span> >- [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]<span>Invalid [% matches.0 | html %] email address found [% borrowernumber | html %]</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]<span>Missing from email address</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]<span>Missing SMS number</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]<span>Message is duplicate</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]<span>No notes from SMS driver</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]<span>Unhandled email failure, check the logs for further details</span> >- [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]<span>Unknown error</span> >- [% ELSE %]<span>Error occurred while sending email.</span> >+ [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]<span class="clearfix">Invalid borrowernumber [% borrowernumber | html %]</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]<span class="clearfix">Unable to find an email address for this borrower</span> >+ [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]<span class="clearfix">Invalid [% matches.0 | html %] email address found [% borrowernumber | html %]</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]<span class="clearfix">Missing from email address</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]<span class="clearfix">Missing SMS number</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]<span class="clearfix">Message is duplicate</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]<span class="clearfix">No notes from SMS driver</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]<span class="clearfix">Unhandled email failure, check the logs for further details</span> >+ [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]<span class="clearfix">Unknown error</span> >+ [% ELSE %]<span class="clearfix">Error occurred while sending email.</span> > [% END %] > [% END %] >- [% IF ( QUEUED_MESSAGE.cc_address ) %] >- <span>Notice copied to: [% QUEUED_MESSAGE.cc_address | html %]</span> >+ [% IF ( QUEUED_MESSAGE.status == 'sent' ) %] >+ [% IF ( QUEUED_MESSAGE.from_address ) %] >+ <span class="clearfix"><span class="label">from:</span> [% QUEUED_MESSAGE.from_address | html %]</span> >+ [% END %] >+ [% IF ( QUEUED_MESSAGE.to_address ) %] >+ <span class="clearfix"><span class="label">to:</span> [% QUEUED_MESSAGE.to_address | html %]</span> >+ [% END %] >+ [% IF ( QUEUED_MESSAGE.cc_address ) %] >+ <span class="clearfix"><span class="label">cc:</span> [% QUEUED_MESSAGE.cc_address | html %]</span> >+ [% END %] > [% END %] > </td> > </tr> >-- >2.41.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 18397
:
61963
|
158666
|
158703
|
158704
|
158712
|
160089