Bugzilla – Attachment 56200 Details for
Bug 17395
exporting checkouts in CSV generates a file with wrong extension
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17395 - exporting checkouts in CVS generates a file with wrong extension
Bug-17395---exporting-checkouts-in-CVS-generates-a.patch (text/plain), 1.81 KB, created by
Danielle Elder
on 2016-10-11 14:33:28 UTC
(
hide
)
Description:
Bug 17395 - exporting checkouts in CVS generates a file with wrong extension
Filename:
MIME Type:
Creator:
Danielle Elder
Created:
2016-10-11 14:33:28 UTC
Size:
1.81 KB
patch
obsolete
>From a9e07cc4dced8893c3be303139ea31bc54c11d31 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 4 Oct 2016 12:52:46 +0200 >Subject: [PATCH] Bug 17395 - exporting checkouts in CVS generates a file with > wrong extension > >In checkouts table, the is an export form (when some exports syspref are enabled). >Export using a CSV profile will create a file with name koha.mrc (same as ISO2709 export). >It would be better with koha.csv. > >Bug 14647 manages the export page, this but will only manage for export from checkouts table where file name is hard-coded. > >Test plan : >- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile for record export >- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx >- Show checkouts table >- Select some checkboxes in "Export" column >- Select "CSV" in export format combo-box >- Click on "Export" >=> Without patch, the generated file is koha.mrc >=> With patch, the generated file is koha.csv >- Check ISO2709 export generates a file named koha.mrc > >Signed-off-by: Dani Elder <dani@bywatersolutions.com> >--- > tools/export.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/export.pl b/tools/export.pl >index c585d90..8ca8d3f 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -39,7 +39,7 @@ my $record_type = $query->param("record_type"); > my $op = $query->param("op") || ''; > my $output_format = $query->param("format") || $query->param("output_format") || 'iso2709'; > my $backupdir = C4::Context->config('backupdir'); >-my $filename = $query->param("filename") || 'koha.mrc'; >+my $filename = $query->param("filename") || ( $output_format eq 'csv' ? 'koha.csv' : 'koha.mrc' ); > $filename =~ s/(\r|\n)//; > > my $dbh = C4::Context->dbh; >-- >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 17395
:
56019
|
56200
|
57748