@@ -, +, @@ definition, expand test --- C4/Acquisition.pm | 7 ++++++- t/db_dependent/Acquisition/GetBasketAsCSV.t | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) --- a/C4/Acquisition.pm +++ a/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) { --- a/t/db_dependent/Acquisition/GetBasketAsCSV.t +++ a/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; --