Bugzilla – Attachment 57407 Details for
Bug 17590
Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
SIGNED-OFF-Bug-17590---Exporting-reports-as-CSV-wi.patch (text/plain), 1.35 KB, created by
Bernardo Gonzalez Kriegel
on 2016-11-09 22:28:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2016-11-09 22:28:21 UTC
Size:
1.35 KB
patch
obsolete
>From 3c41df33b472998a23b4ff3f97a8c1a652ee599d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 8 Nov 2016 17:26:36 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 17590 - Exporting reports as CSV with > 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator > >To test: >Set 'delimiter' system preference to 'tabs' >Export a report as csv >Open the file in text editor and note fields separated by character 't' >Apply patch >Export report as CSV >Open file in text editor and note tabs are used to separate fields > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >tabs now, no errors. >--- > reports/guided_reports.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 9c42863..a5e15be 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -830,6 +830,7 @@ elsif ($phase eq 'Export'){ > } else { > my $delimiter = C4::Context->preference('delimiter') || ','; > if ( $format eq 'csv' ) { >+ $delimiter = "\t" if $delimiter eq 'tabulation'; > $type = 'application/csv'; > my $csv = Text::CSV::Encoded->new({ encoding_out => 'UTF-8', sep_char => $delimiter}); > $csv or die "Text::CSV::Encoded->new({binary => 1}) FAILED: " . Text::CSV::Encoded->error_diag(); >-- >1.9.1
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 17590
:
57342
|
57407
|
57625