Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel
Summary: File types limit in tools/export.pl is causing issues with csv files generate...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 18087
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-30 19:23 UTC by Nick Clemens (kidclamp)
Modified: 2018-12-03 20:04 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel (1.20 KB, patch)
2017-05-30 20:57 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel (1.25 KB, patch)
2017-05-31 20:09 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel (1.35 KB, patch)
2017-06-02 09:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2017-05-30 19:23:00 UTC
It seems that a file saved as csv from Excel sometimes has the mime type:
application/vnd.ms-excel

Bug 18087 limited the file types to:
text/csv
text/plain

Users are complaining of a loss of functionality here.
Comment 1 Jonathan Druart 2017-05-30 20:37:51 UTC
I guess the following patch would fixes the problem:

-        my @valid_mimetypes = qw( application/octet-stream text/csv text/plain );
+        my @valid_mimetypes = qw( application/octet-stream text/csv text/plain application/vnd.ms-excel );

Are we going to create a patch for vendors that provide non-standard mimetype?
(Yes I know, this one is certainly the most used).
Comment 2 Nick Clemens (kidclamp) 2017-05-30 20:57:14 UTC
Created attachment 63856 [details] [review]
Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel

To test:
1 - Save a csv of biblionumber from MS/Excel
2 - Attempt to export records using this file
3 - It fails (mimetype is appliction/vnd.ms-excel)
4 - Apply patch
5 - Try again
6 - It succeeds!
Comment 3 PTFS Europe Sandboxes 2017-05-31 20:08:55 UTC
Patch tested with a sandbox, by Jason Palmer <jpalmer@switchinc.org>
Comment 4 PTFS Europe Sandboxes 2017-05-31 20:09:17 UTC
Created attachment 63892 [details] [review]
Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel

To test:
1 - Save a csv of biblionumber from MS/Excel
2 - Attempt to export records using this file
3 - It fails (mimetype is appliction/vnd.ms-excel)
4 - Apply patch
5 - Try again
6 - It succeeds!

Signed-off-by: Jason Palmer <jpalmer@switchinc.org>
Comment 5 Jason Palmer 2017-05-31 20:10:57 UTC
Executed plan in test environment.  Works as desired.
Comment 6 Marcel de Rooy 2017-06-02 09:30:42 UTC
Created attachment 63932 [details] [review]
Bug 18704 - File types limit in tools/export.pl is causing issues with csv files generated by MS/Excel

To test:
1 - Save a csv of biblionumber from MS/Excel
2 - Attempt to export records using this file
3 - It fails (mimetype is appliction/vnd.ms-excel)
4 - Apply patch
5 - Try again
6 - It succeeds!

Signed-off-by: Jason Palmer <jpalmer@switchinc.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Jonathan Druart 2017-06-05 14:57:16 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin Somers 2017-06-09 10:56:20 UTC
Pushed to 17.05.x, will be in v17.05.01
Comment 9 Katrin Fischer 2017-06-11 19:40:23 UTC
This patch has been pushed to 16.11.x and will be in 16.11.09.
Comment 10 Mason James 2017-07-31 11:15:37 UTC
Pushed to 16.05.x, for 16.05.15 release