Bug 6285 strange order in CSV upload
authorPaul Poulain <paul.poulain@biblibre.com>
Fri, 29 Apr 2011 17:31:40 +0000 (19:31 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 19 Oct 2011 03:50:33 +0000 (16:50 +1300)
uploading the circ overdues result in a csv with columns in a strange order
and not the order of the screen
This patch reorder the column by putting the usefull ones first

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
circ/overdue.pl

index 7467874..dc15e8b 100755 (executable)
@@ -398,7 +398,8 @@ sub build_csv {
     my @lines = ();
 
     # build header ...
-    my @keys = grep { $_ ne 'patron_attr_value_loop' } sort keys %{ $overdues->[0] };
+    my @keys = qw /duedate title author borrowertitle name phone barcode email address address2 zipcode city country
+                branchcode itemcallnumber biblionumber borrowernumber itemnum replacementprice streetnumber streettype/;
     my $csv = Text::CSV_XS->new();
     $csv->combine(@keys);
     push @lines, $csv->string();