To test:
1) Go to Tools -> CSV profiles -> New CSV Profile
2) Create a new CSV profile with any name of SQL fields. Ensure profile
type: SQL and usage: basket export in acquisition
3) Go to Acquisitions -> Find or create a vendor -> Use or create a
basket
4) Click the dropdown menu next to the 'Export as CSV' button. There
should be a 'Default' option and your new CSV profile (at least)
5) Click the 'Default' option. Notice warns
6) Click the 'Export as CSV' button. Notice warns
7) Click your new CSV profile option. Notice warns
8) Apply patch and refresh page
9) Repeat steps 5-7, confirm that warns do not show
10) Confirm export still works as expected
Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
-type => 'text/csv',
-attachment => 'basket' . $basket->{'basketno'} . '.csv',
);
-type => 'text/csv',
-attachment => 'basket' . $basket->{'basketno'} . '.csv',
);
- if ( $query->param('csv_profile') eq 'default'){
- print GetBasketAsCSV($query->param('basketno'), $query);
+ my $csv_profile_id = $query->param('csv_profile');
+ if (defined $csv_profile_id) {
+ # using a csv profile
+ print GetBasketAsCSV(scalar $query->param('basketno'), $query, $csv_profile_id);
- my $csv_profile_id = $query->param('csv_profile');
- print GetBasketAsCSV($query->param('basketno'), $query, $csv_profile_id);
+ # using default
+ print GetBasketAsCSV(scalar $query->param('basketno'), $query);
}
exit;
} elsif ($op eq 'email') {
}
exit;
} elsif ($op eq 'email') {