Bugzilla – Attachment 113891 Details for
Bug 27045
Exports using CSV profiles with tab as separator don't work correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27045: Fix other exports
Bug-27045-Fix-other-exports.patch (text/plain), 1.83 KB, created by
Jonathan Druart
on 2020-11-20 14:33:47 UTC
(
hide
)
Description:
Bug 27045: Fix other exports
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-20 14:33:47 UTC
Size:
1.83 KB
patch
obsolete
>From de8d2610379b1c144f1a366f79a5bfe276cf0281 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 20 Nov 2020 15:33:14 +0100 >Subject: [PATCH] Bug 27045: Fix other exports > >--- > C4/Acquisition.pm | 4 +++- > serials/lateissues-export.pl | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 2ac15473b4..f912aaf276 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -254,7 +254,9 @@ sub GetBasketAsCSV { > my $csv_profile = Koha::CsvProfiles->find( $csv_profile_id ); > Koha::Exceptions::ObjectNotFound->throw( 'There is no valid csv profile given') unless $csv_profile; > >- my $csv = Text::CSV_XS->new({'quote_char'=>'"','escape_char'=>'"','sep_char'=>$csv_profile->csv_separator,'binary'=>1}); >+ my $delimiter = $csv_profile->csv_separator; >+ $delimiter = "\t" if $delimiter eq "\\t"; >+ my $csv = Text::CSV_XS->new({'quote_char'=>'"','escape_char'=>'"','sep_char'=>$delimiter,'binary'=>1}); > my $csv_profile_content = $csv_profile->content; > my ( @headers, @fields ); > while ( $csv_profile_content =~ / >diff --git a/serials/lateissues-export.pl b/serials/lateissues-export.pl >index 7af3395d1b..676909a15b 100755 >--- a/serials/lateissues-export.pl >+++ b/serials/lateissues-export.pl >@@ -36,10 +36,13 @@ my $csv_profile_id = $query->param('csv_profile'); > my $csv_profile = Koha::CsvProfiles->find( $csv_profile_id ); > die "There is no valid csv profile given" unless $csv_profile; > >+my $delimiter = $csv_profile->csv_separator; >+$delimiter = "\t" if $delimiter eq "\\t"; >+ > my $csv = Text::CSV_XS->new({ > 'quote_char' => '"', > 'escape_char' => '"', >- 'sep_char' => $csv_profile->csv_separator, >+ 'sep_char' => $delimiter, > 'binary' => 1 > }); > >-- >2.20.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 27045
:
113890
|
113891
|
137790
|
137791
|
137792
|
137793
|
137794
|
137933
|
137934
|
137935