runreport.pl allows for sending html reports via email. The problem is that the Content-Type isn't set to text/html, which means that the generated html email isn't displayed properly. The patch for this sets the content type, and also adds a tiny bit of css to alternate row colours (just to make long reports a bit easier on the eye!)
Nicholas: If you send a patch, you can overwrite the default assignee.
Created attachment 20546 [details] [review] Send html reports with the proper Content-Type
Sorry to be a bother, may we have a test plan please? Cheers, Liz
Will provide one next week, when I'm back in that office!
Test plan: 1. Run a report as follows: ./runreport.pl --format=html --to=YOUREMAIL --subject="Bad formatting" REPORTNUMBER 2. Look at the email - the html code should show in modern email readers. 3. Apply the pathc 4. Run the report again: ./runreport.pl --format=html --to=vanoudt@gmail.com --subject="Lost items report" 45 5. Look at the email - it should appear nicely formatted with no html codes visible
Created attachment 25603 [details] [review] [SIGNED OFF] Bug 10777 - Send html reports with the proper Content-Type The misc/cronjobs/runreport.pl allows for sending html reports via email. The problem is that the Content-Type isn't set to text/html, which means that the generated html email isn't displayed properly. This patch set the Content-Type, and also adds a tiny bit of CSS to potentially alternate row colours (just to make long reports a bit easier on the eye!) TEST PLAN ---------- 1. Run the script similar to this: ./misc/cronjobs/runreport.pl --format=html --to=YOUREMAIL --subject="Bad Formatting!" REPORTNUMBER 2. Look at the email - the html code should by visible and ugly. 3. apply the patch 4. Run the script again. 5. Look at the email - the data should look nicer now. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 26063 [details] [review] [PASSED QA] Bug 10777 - Send html reports with the proper Content-Type The misc/cronjobs/runreport.pl allows for sending html reports via email. The problem is that the Content-Type isn't set to text/html, which means that the generated html email isn't displayed properly. This patch set the Content-Type, and also adds a tiny bit of CSS to potentially alternate row colours (just to make long reports a bit easier on the eye!) TEST PLAN ---------- 1. Run the script similar to this: ./misc/cronjobs/runreport.pl --format=html --to=YOUREMAIL --subject="Bad Formatting!" REPORTNUMBER 2. Look at the email - the html code should by visible and ugly. 3. apply the patch 4. Run the script again. 5. Look at the email - the data should look nicer now. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Code looks good, functions still work as expected with no regressions, qa scripts all pass as expected. Nice tirvial patch.
Pushed to master, along with a follow-up to tweak the CSS to improve the changes that recipients will see the zebra-striping. This appears to be your first patch accepted into Koha master. Congratulations, Nicholas!
Thank you very much! Nice to be able to give something back!
Pushed to 3.14.x, will be in 3.14.07
Pushed to 3.12.x will be in 3.12.13