Bugzilla – Attachment 112021 Details for
Bug 26745
Notice titles/subjects should support Template Toolkit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26745: Add TT support to 'title' in notices
Bug-26745-Add-TT-support-to-title-in-notices.patch (text/plain), 1.52 KB, created by
Martin Renvoize (ashimema)
on 2020-10-20 09:26:50 UTC
(
hide
)
Description:
Bug 26745: Add TT support to 'title' in notices
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-10-20 09:26:50 UTC
Size:
1.52 KB
patch
obsolete
>From d5716479b3aeee518d5f0ee65e4222c01ed2bf03 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 20 Oct 2020 09:43:22 +0100 >Subject: [PATCH] Bug 26745: Add TT support to 'title' in notices > >This patch adds support for using TT syntax in the title element of the >notices system. > >Test plan >1/ Edit an easily triggerable email notice such that the title contains > some template toolkit markup. > Example: Edit the 'CHECKOUT' notice to include [% today %] in the > title field. >2/ Trigger the notice (For 'CHECKOUT' that means checking an item out to > a user (Preferably with 'email' selected in their advanced messaging > preferences for the notice) >3/ Either, navigate to the 'Notices' tab for the user, or run the > message queue and inspect the subject line of the recieved email. >4/ Prior to the patch the TT syntax would remain 'as is'.. i.e > '[% today %]'. >5/ After the patch, the TT syntax should have been properly replaced. >6/ Signoff >--- > C4/Letters.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 2bae52d346..d4793b31be 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -707,6 +707,15 @@ sub GetPreparedLetter { > } > ); > >+ $letter->{title} = _process_tt( >+ { >+ content => $letter->{title}, >+ tables => $tables, >+ loops => $loops, >+ substitute => $substitute, >+ } >+ ); >+ > $letter->{content} =~ s/<<\S*>>//go; #remove any stragglers > > return $letter; >-- >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 26745
:
112020
|
112021
|
112136
|
112178
|
112983