Bug 10727 - Replace carriage return with <br /> when writing hold notices
Summary: Replace carriage return with <br /> when writing hold notices
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Sophie MEYNIEUX
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-14 13:47 UTC by Sophie MEYNIEUX
Modified: 2015-06-04 23:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 10727 : Replace carriage return with <br /> when printing hold notices (1.64 KB, patch)
2013-08-14 13:54 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
Bug 10727 : Replace carriage return with <br /> when printing hold notices (1.66 KB, patch)
2013-09-02 05:46 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 10727 : Replace carriage return with <br /> when printing hold notices (1.73 KB, patch)
2013-09-06 16:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12300 : Revert Bug 10727: Cancel replacing carriage return with <br /> when printing hold notices" (1.18 KB, patch)
2014-05-27 21:25 UTC, Bernardo Gonzalez Kriegel
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-14 13:47:21 UTC
This patch replaces carriage return with <br /> in the content of hold notices for printing. This is necessary to convert html file into well formatted pdf file.

Test plan : 
- return an item reserved by a borrower that has not activated email notification
- verify in message_queue table that you've got a new HOLD_PRINT notice with status 'pending'
- run gather_print_notices.pl <directory>

Without the patch, the script generates a html file without <br /> tags. If you run printoverdues.sh <directory>, the text in the resulting pdf file is all on one line

With the patch, the script generates a html file with <br/> tags and pdf file created by printoverdues.sh is well formatted.
Comment 1 Sophie MEYNIEUX 2013-08-14 13:54:49 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-09-02 01:07:54 UTC
In such cases, it is slightly better to say (within the loop):
local $_ = $message->{'content'};
S/// ...

That saves two var copies.

I will make that change when signing off.
Comment 3 Srdjan Jankovic 2013-09-02 05:46:12 UTC Comment hidden (obsolete)
Comment 4 Srdjan Jankovic 2013-09-02 05:47:29 UTC
Please disregard my comment, wasn't too intelligent.
Comment 5 Kyle M Hall 2013-09-06 16:16:19 UTC Comment hidden (obsolete)
Comment 6 Galen Charlton 2013-09-06 16:54:07 UTC
Pushed to master.  Thanks, Sophie!
Comment 7 Tomás Cohen Arazi 2013-09-16 14:08:48 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Sophie!
Comment 8 Bernardo Gonzalez Kriegel 2013-10-13 13:28:25 UTC
Pushed to 3.10.x, will be in 3.10.12
Comment 9 Bernardo Gonzalez Kriegel 2014-05-27 21:25:38 UTC Comment hidden (obsolete)
Comment 10 Bernardo Gonzalez Kriegel 2014-05-27 21:27:21 UTC
Comment on attachment 28502 [details] [review]
[SIGNED-OFF] Bug 12300 : Revert Bug 10727: Cancel replacing carriage return with <br /> when printing hold notices"

Sorry, wrong bug