Bug 10720 - Substitution term in overdue notices shouldn't be removed even if they don't match
Summary: Substitution term in overdue notices shouldn't be removed even if they don't ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P3 normal (vote)
Assignee: Sophie MEYNIEUX
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-13 15:49 UTC by Sophie MEYNIEUX
Modified: 2020-01-24 11:50 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10720 : substitution term in overdue notices shouldn't be removed if they don't match. It prevents use of html in notices to use with css (1.95 KB, patch)
2013-08-13 16:22 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
Bug 10720 : substitution term in overdue notices shouldn't be removed if they don't match. It prevents use of html in notices to use with css (1.76 KB, patch)
2013-09-02 06:02 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 10720 : substitution term in overdue notices shouldn't be removed if they don't match. It prevents use of html in notices to use with css (1.83 KB, patch)
2013-09-06 16:03 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie MEYNIEUX 2013-08-13 15:49:21 UTC
In overdue notices we use some text enclosed by << >> or < > for substitution.
At the end of the process, if some of this text still remains, a warn is printed in logfile and the remaining substitution is erased.

This procedure prevents to use html tag in notices, needed to format display with css for example.

If a susbstitution text does not match any valid term and is not a valid html tag, it should be corrected notice template itself (and warn help to do this) but not systematically deleted.
Comment 1 Sophie MEYNIEUX 2013-08-13 16:22:12 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-09-02 06:02:49 UTC Comment hidden (obsolete)
Comment 3 Srdjan Jankovic 2013-09-02 06:04:50 UTC
I've removed those lines, this script should use GetPreparedLetter anyway.
Comment 4 Kyle M Hall 2013-09-06 16:03:16 UTC
Created attachment 20829 [details] [review]
Bug 10720 : substitution term in overdue notices shouldn't be removed if they don't match. It prevents use of html in notices to use with css

Test plan :
        - define an overdue notice containing some valid substitution terms + some valid html tags (<strong> or <div class="my class" to use with a css
        - find a borrower with overdues that trigger this notice
        - run overdue_notices.pl -html <directory>

        Without patch, your html tags are missing in your html file
        With the patch, they are present and can be used with a css to generate a formatted pdf file.

        If you add some invalid substitution term, with the patch, they are still in the final letter, but the warn in the log helps you to correct your notice template.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Galen Charlton 2013-11-01 00:29:49 UTC
Pushed to master.  Thanks, Sophie!
Comment 6 Tomás Cohen Arazi 2013-11-20 16:45:24 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.

Thanks Sophie!