[Bug 34728] New: HTML notices should not be pre-formatted
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Bug ID: 34728 Summary: HTML notices should not be pre-formatted Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: matt.blenkinsop@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 155263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155263&action=edit Spacing before Print notices that are html templates are wrapped in a <pre> tag which causes inconsistencies in formatting. Extra spaces are introduced that shouldn't be, this is solved by making the <pre> tag conditional on the content type of the message. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 155264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155264&action=edit Spacing after -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 155265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155265&action=edit Bug 34728: Make pre tag conditional This patch makes the pre-formatting of notice templates conditional on the content type. Test plan: 1) Navigate to tools > Notices and slips 2) Edit the notice with the code of HOLD 3) Under print, paste the following <p>Please collect within 10 days from the date of this letter and don't forget to bring your library card with you.</p> <p>Be aware that opening hours vary at different library branches so if in doubt double check the times before you visit.</p> <p>Should you no longer require this item please contact us so we can make it available for another customer.</p> <p>Thank you</p> 4) Check the box that says HTML message and save the notice 5) In Patrons, select a patron and in Patron messaging preferences, check the box in the Email column for Hold filled 6) Find a record in the catalogue 7) Copy the barcode for one of the items 8) Place a hold on the item for the patron you selected 9) Navigate to Circulation > Check-in 10) Paste the barcode in the Check-in box and click Check-in 11) In the pop-up box, click Confirm hold 12) In the command line, run perl misc/cronjobs/gather_print_notices.pl --letter_code=HOLD --html /tmp 13) cd /tmp 14) There should be a file in there called 'notices_HOLD-date.html 15) cat this file 16) The html you pasted in the template will be wrapped in a <pre> tag 17) Apply patch and restart_all 18) rm the notices file that was created 19) cd /kohadevbox/koha 20) Select a new record from the catalogue and repeat steps 7-15 for this record, using the same patron 21) This time, the html file should not contain the <pre> tag 22) Sign off! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33478 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155265|0 |1 is obsolete| | --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 155599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155599&action=edit Bug 34728: Make pre tag conditional This patch makes the pre-formatting of notice templates conditional on the content type. Test plan: 1) Navigate to tools > Notices and slips 2) Edit the notice with the code of HOLD 3) Under print, paste the following <p>Please collect within 10 days from the date of this letter and don't forget to bring your library card with you.</p> <p>Be aware that opening hours vary at different library branches so if in doubt double check the times before you visit.</p> <p>Should you no longer require this item please contact us so we can make it available for another customer.</p> <p>Thank you</p> 4) Check the box that says HTML message and save the notice 5) In Patrons, select a patron and in Patron messaging preferences, check the box in the Email column for Hold filled 6) Find a record in the catalogue 7) Copy the barcode for one of the items 8) Place a hold on the item for the patron you selected 9) Navigate to Circulation > Check-in 10) Paste the barcode in the Check-in box and click Check-in 11) In the pop-up box, click Confirm hold 12) In the command line, run perl misc/cronjobs/gather_print_notices.pl --letter_code=HOLD --html /tmp 13) cd /tmp 14) There should be a file in there called 'notices_HOLD-date.html 15) cat this file 16) The html you pasted in the template will be wrapped in a <pre> tag 17) Apply patch and restart_all 18) rm the notices file that was created 19) cd /kohadevbox/koha 20) Select a new record from the catalogue and repeat steps 7-15 for this record, using the same patron 21) This time, the html file should not contain the <pre> tag 22) Sign off! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155599|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 155639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155639&action=edit Bug 34728: Make pre tag conditional This patch makes the pre-formatting of notice templates conditional on the content type. Test plan: 1) Navigate to tools > Notices and slips 2) Edit the notice with the code of HOLD 3) Under print, paste the following <p>Please collect within 10 days from the date of this letter and don't forget to bring your library card with you.</p> <p>Be aware that opening hours vary at different library branches so if in doubt double check the times before you visit.</p> <p>Should you no longer require this item please contact us so we can make it available for another customer.</p> <p>Thank you</p> 4) Check the box that says HTML message and save the notice 5) In Patrons, select a patron and in Patron messaging preferences, check the box in the Email column for Hold filled 6) Find a record in the catalogue 7) Copy the barcode for one of the items 8) Place a hold on the item for the patron you selected 9) Navigate to Circulation > Check-in 10) Paste the barcode in the Check-in box and click Check-in 11) In the pop-up box, click Confirm hold 12) In the command line, run perl misc/cronjobs/gather_print_notices.pl --letter_code=HOLD --html /tmp 13) cd /tmp 14) There should be a file in there called 'notices_HOLD-date.html 15) cat this file 16) The html you pasted in the template will be wrapped in a <pre> tag 17) Apply patch and restart_all 18) rm the notices file that was created 19) cd /kohadevbox/koha 20) Select a new record from the catalogue and repeat steps 7-15 for this record, using the same patron 21) This time, the html file should not contain the <pre> tag 22) Sign off! Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 155640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155640&action=edit Bug 34728: (QA follow-up) Remove o modifier, bit more compact Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|23.11.00 |23.11.00,23.05.04 released in| | --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22131 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34704 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34704 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34704 [Bug 34704] Print templates are formatted incorrectly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34728 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- WARN misc/cronjobs/gather_print_notices.pl WARN tidiness The file is less tidy than before (bad/messy lines before: 92, now: 93) Fixed in amended last patch. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org