Bug 10727

Summary: Replace carriage return with <br /> when writing hold notices
Product: Koha Reporter: Sophie MEYNIEUX <sophie.meynieux>
Component: NoticesAssignee: Sophie MEYNIEUX <sophie.meynieux>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P3 CC: bgkriegel, gmcharlt, srdjan, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6030
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12300
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 10727 : Replace carriage return with <br /> when printing hold notices
Bug 10727 : Replace carriage return with <br /> when printing hold notices
Bug 10727 : Replace carriage return with <br /> when printing hold notices
[SIGNED-OFF] Bug 12300 : Revert Bug 10727: Cancel replacing carriage return with <br /> when printing hold notices"

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 (khall) 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 (tcohen) 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