Bugzilla – Attachment 76698 Details for
Bug 21035
runreport.pl prints only a newline when printing a row that has a field that contains an embedded newline
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21035: Handle new lines when running reports
Bug-21035-Handle-new-lines-when-running-reports.patch (text/plain), 1.35 KB, created by
Jonathan Druart
on 2018-07-04 18:07:10 UTC
(
hide
)
Description:
Bug 21035: Handle new lines when running reports
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-07-04 18:07:10 UTC
Size:
1.35 KB
patch
obsolete
>From 2beb49666e0cc52b9b7975d42930fe180bce50f9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Jul 2018 15:05:25 -0300 >Subject: [PATCH] Bug 21035: Handle new lines when running reports > >See https://metacpan.org/pod/Text::CSV_XS#Embedded-newlines > >Test plan: > >1) Choose two items, say barcode '123' and '456' >2) Change the public note on 123 to read > >Line1 >Line2 > >(I.e. type 'Line1', then press Enter, type 'Line2' and click update). >3) Change the public note on 456 to read > >Public note has one and only one line. > >Click update. >4) Create a report with the followng query: > >select barcode, itemnotes from items where barcode in ( '123', '456' ) > >Let's say that this is report number 10. > >5) run ./misc/cronjobs/runreport.pl --format=csv REPORT_ID: > >=> You should see both lines >--- > misc/cronjobs/runreport.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl >index cb10125938..65b0e97e26 100755 >--- a/misc/cronjobs/runreport.pl >+++ b/misc/cronjobs/runreport.pl >@@ -273,6 +273,7 @@ foreach my $report_id (@ARGV) { > $message = $cgi->table(join "", @rows); > } elsif ($format eq 'csv') { > my $csv = Text::CSV_XS->new({ >+ binary => 1, > quote_char => $quote, > sep_char => $separator, > }); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21035
:
76698
|
76964
|
77425