Bugzilla – Attachment 166379 Details for
Bug 31627
Add ability to embed the letter ID in outgoing email notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31627: Add ability to embed the letter id in outgoing email notices
Bug-31627-Add-ability-to-embed-the-letter-id-in-ou.patch (text/plain), 2.05 KB, created by
Kyle M Hall (khall)
on 2024-05-08 10:44:33 UTC
(
hide
)
Description:
Bug 31627: Add ability to embed the letter id in outgoing email notices
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-05-08 10:44:33 UTC
Size:
2.05 KB
patch
obsolete
>From e5af44c00113aefe9e1f7011fc8b52cb3a3483b0 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Mon, 26 Sep 2022 12:23:33 -0400 >Subject: [PATCH] Bug 31627: Add ability to embed the letter id in outgoing > email notices > >It can be useful to know exactly what template was used to generate a notice. To further this end, it would be useful be able to send the letter id as part of any emails sent out if there is a letter template associated with the message. > >Test Plan: >1) Apply this patch >2) Restart all the things! >3) Generate an email notice like a checkout notice >4) Inspect the email headers, note the new X-Koha-Letter-Id and > X-Koha-Message-Id headers! > >Signed-off-by: Sam Lau <samalau@gmail.com> >--- > C4/Letters.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index dc1db2190b0..6bc6e870bd3 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1293,7 +1293,7 @@ sub _get_unsent_messages { > > my $dbh = C4::Context->dbh(); > my $statement = qq{ >- SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code, mq.failure_code >+ SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code, mq.failure_code, mq.letter_id > FROM message_queue mq > LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber > WHERE status = ? >@@ -1464,6 +1464,8 @@ sub _send_message_by_email { > $email->create($params); > } else { > $email = Koha::Email->create($params); >+ $email->header('X-Koha-Letter-Id', $message->{letter_id} ); >+ $email->header('X-Koha-Message-Id', $message->{id} ); > if ($is_html) { > $email->html_body( _wrap_html( $content, $subject ) ); > } else { >-- >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 31627
:
140998
|
141025
|
142826
|
143022
|
151536
|
151537
|
155364
|
166374
|
166375
|
166376
|
166377
|
166378
|
166379
|
166399
|
166400
|
166401