[Bug 13448] New: runreport.pl html email striping
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 Bug ID: 13448 Summary: runreport.pl html email striping Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: gmcharlt@gmail.com Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: fridolyn.somers@biblibre.com, gmcharlt@gmail.com, kyle@bywatersolutions.com, liz@catalyst.net.nz, m.de.rooy@rijksmuseum.nl, martin.renvoize@ptfs-europe.com, vanoudt@gmail.com Depends on: 10777 As of Bug 10777 Galen added css to zebra stripe html emailed reports; unfortunately this was implemented in a way incompatible with both gmail and hotmail on-line email clients This is reasonably easily solved by in-lining the styles as opposed to adding them to the page head. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 34342 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34342&action=edit Bug 13448: Make Striping gmail/hotmail compatible This patch inlines the css to stripe a html output report -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|10777 |13447 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |martin.renvoize@ptfs-europe | |.com CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com Severity|enhancement |minor --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- This isn't an enhancement. It is fixing a behaviour broken in particular contexts. Changed to 'minor' bug fix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 34342 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34342 Bug 13448: Make Striping gmail/hotmail compatible Review of attachment 34342: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13448&attachment=34342) ----------------------------------------------------------------- ::: misc/cronjobs/runreport.pl @@ +249,3 @@
while (my $line = $sth->fetchrow_arrayref) { foreach (@$line) { defined($_) or $_ = ''; } # catch undef values, replace w/ '' + if ($count++ % 2 == 0) {
This is an ugly coding style! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 34342 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34342 Bug 13448: Make Striping gmail/hotmail compatible Review of attachment 34342: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13448&attachment=34342) ----------------------------------------------------------------- ::: misc/cronjobs/runreport.pl @@ -270,4 @@
my $email = Koha::Email->new(); my %mail; if ($format eq 'html') { - $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>";
It makes sense to remove the <head>...</head>, but the <html><body>$message</body></html> should probably be left in tact. Otherwise, you get just <table>...</table> as your message. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Marking as failed qa because: 1) coding style which has multiple side effects in a single statement, but more importantly, 2) Only generating <table>...</table>, because of excessive cutting. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to M. Tompsett from comment #3)
Comment on attachment 34342 [details] [review] Bug 13448: Make Striping gmail/hotmail compatible
Review of attachment 34342 [details] [review]: -----------------------------------------------------------------
::: misc/cronjobs/runreport.pl @@ +249,3 @@
while (my $line = $sth->fetchrow_arrayref) { foreach (@$line) { defined($_) or $_ = ''; } # catch undef values, replace w/ '' + if ($count++ % 2 == 0) {
This is an ugly coding style!
What's ugly? What do you suggest? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13448 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Jonathan Druart from comment #6)
(In reply to M. Tompsett from comment #3)
+ if ($count++ % 2 == 0) {
This is an ugly coding style!
What's ugly? What do you suggest?
Incrementing should be external to the modulus comparison. $count++; if ($count%2==1) { This is more readable, and less likely to be misunderstood. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org