Bugzilla – Attachment 63279 Details for
Bug 8612
CSV export profile to have custom fields in export csv basket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8612: QA followup - strip white chars from csv profile definition, expand test
Bug-8612-QA-followup---strip-white-chars-from-csv-.patch (text/plain), 1.65 KB, created by
Josef Moravec
on 2017-05-09 08:05:12 UTC
(
hide
)
Description:
Bug 8612: QA followup - strip white chars from csv profile definition, expand test
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-05-09 08:05:12 UTC
Size:
1.65 KB
patch
obsolete
>From e7d91c8fba757b0a0d2fc2d9901248064ee53921 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Fri, 5 May 2017 08:46:34 +0000 >Subject: [PATCH] Bug 8612: QA followup - strip white chars from csv profile > definition, expand test > >--- > C4/Acquisition.pm | 7 ++++++- > t/db_dependent/Acquisition/GetBasketAsCSV.t | 2 +- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 7a70852..01ffd4c 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -300,9 +300,14 @@ sub GetBasketAsCSV { > ([^\|]*) # fieldname (table.row or row) > \|? /gxms > ) { >- push @headers, $1; >+ my $header = $1; > my $field = ($2 eq '') ? $1 : $2; >+ >+ $header =~ s/^\s+|\s+$//g; # Trim whitespaces >+ push @headers, $header; >+ > $field =~ s/[^\.]*\.{1}//; # Remove the table name if exists. >+ $field =~ s/^\s+|\s+$//g; # Trim whitespaces > push @fields, $field; > } > for my $order (@orders) { >diff --git a/t/db_dependent/Acquisition/GetBasketAsCSV.t b/t/db_dependent/Acquisition/GetBasketAsCSV.t >index 260bd85..b6dfdbe 100644 >--- a/t/db_dependent/Acquisition/GetBasketAsCSV.t >+++ b/t/db_dependent/Acquisition/GetBasketAsCSV.t >@@ -42,7 +42,7 @@ my $csv_profile2 = Koha::CsvProfile->new({ > profile => 'my user profile', > type => 'export_basket', > csv_separator => ',', >- content => 'biblio.author|title=biblio.title|quantity=aqorders.quantity', >+ content => 'biblio.author | title = biblio.title|quantity=aqorders.quantity', > })->store; > > my $basketno; >-- >2.1.4
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 8612
:
11514
|
36860
|
37289
|
37293
|
41224
|
41225
|
41226
|
41227
|
42532
|
42533
|
42534
|
47591
|
47592
|
47593
|
56222
|
56223
|
56224
|
56225
|
57012
|
57013
|
57024
|
57025
|
57026
|
57027
|
57028
|
57029
|
57079
|
58073
|
58074
|
58075
|
58076
|
58077
|
58078
|
58079
|
58985
|
58986
|
58987
|
58988
|
58989
|
58990
|
58991
|
58992
|
59757
|
60480
|
61264
|
61265
|
61266
|
61267
|
61405
|
61520
|
63048
|
63049
|
63050
|
63051
|
63052
|
63053
|
63054
|
63055
|
63056
|
63104
|
63158
|
63279
|
63910
|
63911
|
63912
|
63913
|
63914
|
63915
|
63964
|
63966