Summary: | Notice titles/subjects should support Template Toolkit | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Notices | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, lucas, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21898 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch introduces the ability to use template toolkit syntax in the subject line of email notices.
|
Version(s) released in: |
20.11.00
|
Circulation function: | |||
Attachments: |
Bug 26745: Add TT support to 'title' in notices
Bug 26745: Add TT support to 'title' in notices Bug 26745: Add TT support to 'title' in notices Bug 26745: Add TT support to 'title' in notices Bug 26745: (QA follow-up) Add Unit Tests |
Description
Martin Renvoize (ashimema)
2020-10-20 08:43:11 UTC
Created attachment 112020 [details] [review] 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 Created attachment 112021 [details] [review] 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 Created attachment 112136 [details] [review] 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 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 112178 [details] [review] 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 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Please add a test for that. Created attachment 112983 [details] [review] Bug 26745: (QA follow-up) Add Unit Tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to master for 20.11, thanks to everybody involved! A very unintentional side-effect of this patch has been to caught a bug in SendAlerts, see bug 26935. # Failed test 'SendAlerts - claimissue' # at t/db_dependent/Letters.t line 642. C4::Letters::_substitute_tables(): DBI Exception: DBD::mysql::st execute failed: called with 2 bind variables when 1 are needed [for Statement "SELECT * FROM aqbasket WHERE basketno = ?" with ParamValues: 0=53] at /kohadevbox/koha/C4/Letters.pm line 679 (In reply to Jonathan Druart from comment #8) > A very unintentional side-effect of this patch has been to caught a bug in > SendAlerts, see bug 26935. > > # Failed test 'SendAlerts - claimissue' > # at t/db_dependent/Letters.t line 642. > C4::Letters::_substitute_tables(): DBI Exception: DBD::mysql::st execute > failed: called with 2 bind variables when 1 are needed [for Statement > "SELECT * FROM aqbasket WHERE basketno = ?" with ParamValues: 0=53] at > /kohadevbox/koha/C4/Letters.pm line 679 This comment was for bug 21898. enhancement will not be backported to 20.05.x |