Bugzilla – Attachment 63913 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: [Follow-up] Fix regular expression
Bug-8612-Follow-up-Fix-regular-expression.patch (text/plain), 1.61 KB, created by
Marcel de Rooy
on 2017-06-02 06:54:08 UTC
(
hide
)
Description:
Bug 8612: [Follow-up] Fix regular expression
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-06-02 06:54:08 UTC
Size:
1.61 KB
patch
obsolete
>From 5cf2b4f108bee22a8a8a4fe4fb0f91cbc08e74e0 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Thu, 4 May 2017 07:43:27 +0000 >Subject: [PATCH] Bug 8612: [Follow-up] Fix regular expression >Content-Type: text/plain; charset=utf-8 > >Fix regular expression to do what is described in the comment >Make header in CSV profile definition optional >Strip white chars from csv profile definition > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Acquisition.pm | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index f17402f..ac5415b 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -295,14 +295,19 @@ sub GetBasketAsCSV { > my $csv_profile_content = $csv_profile->content; > my ( @headers, @fields ); > while ( $csv_profile_content =~ / >- ([^=]+) # header >- = >- ([^\|]+) # fieldname (table.row or row) >+ ([^=\|]+) # header >+ =? >+ ([^\|]*) # fieldname (table.row or row) > \|? /gxms > ) { >- push @headers, $1; >- my $field = $2; >- $field =~ s/[^\.]*\.?//; # Remove the table name if exists. >+ 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) { >-- >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