Bug 18918 - Exporting bibs in CSV when you have no CSV profiles created causes error
Summary: Exporting bibs in CSV when you have no CSV profiles created causes error
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-10 02:30 UTC by Aleisha Amohia
Modified: 2017-08-24 13:54 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18918: Disable CSV option if no CSV profiles exist (1.86 KB, patch)
2017-07-10 02:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 18918: Disable CSV option if no CSV profiles exist (1.92 KB, patch)
2017-07-10 13:25 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18918: Disable CSV option if no CSV profiles exist (2.00 KB, patch)
2017-07-13 19:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2017-07-10 02:30:54 UTC
When you export (tools -> export data) biblios in a CSV file format, koha breaks and gives this error in the error log: There is no valid csv profile defined for this export at /home/vagrant/kohaclone/Koha/Exporter/Record.pm line 146.
Comment 1 Aleisha Amohia 2017-07-10 02:34:29 UTC
Created attachment 64945 [details] [review]
Bug 18918: Disable CSV option if no CSV profiles exist

To test:
1) Confirm you have no MARC CSV profiles (tools -> csv profiles)
2) Go to Tools -> Export data
3) Select the CSV file format for biblios
4) Notice the CSV profile dropdown shows up but the dropdown is empty
5) Click the Export button, notice Koha breaks
6) Go back and apply the patch, refresh
7) Notice the CSV option is now disabled in the file format menu
8) If you hover over CSV, an appropriate message should show explaining
why it is disabled
9) Create a CSV profile for MARC
10) Go back to Export and you should be able to use CSV now without
problem

Sponsored-by: Catalyst IT
Comment 2 Lee Jamison 2017-07-10 13:25:20 UTC
Created attachment 64964 [details] [review]
Bug 18918: Disable CSV option if no CSV profiles exist

To test:
1) Confirm you have no MARC CSV profiles (tools -> csv profiles)
2) Go to Tools -> Export data
3) Select the CSV file format for biblios
4) Notice the CSV profile dropdown shows up but the dropdown is empty
5) Click the Export button, notice Koha breaks
6) Go back and apply the patch, refresh
7) Notice the CSV option is now disabled in the file format menu
8) If you hover over CSV, an appropriate message should show explaining
why it is disabled
9) Create a CSV profile for MARC
10) Go back to Export and you should be able to use CSV now without
problem

Sponsored-by: Catalyst IT

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 3 Jonathan Druart 2017-07-13 19:43:11 UTC
Created attachment 65027 [details] [review]
Bug 18918: Disable CSV option if no CSV profiles exist

To test:
1) Confirm you have no MARC CSV profiles (tools -> csv profiles)
2) Go to Tools -> Export data
3) Select the CSV file format for biblios
4) Notice the CSV profile dropdown shows up but the dropdown is empty
5) Click the Export button, notice Koha breaks
6) Go back and apply the patch, refresh
7) Notice the CSV option is now disabled in the file format menu
8) If you hover over CSV, an appropriate message should show explaining
why it is disabled
9) Create a CSV profile for MARC
10) Go back to Export and you should be able to use CSV now without
problem

Sponsored-by: Catalyst IT

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2017-07-13 21:44:02 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 5 Fridolin SOMERS 2017-07-27 14:23:49 UTC
Pushed to 17.05.x, will be in 17.05.03.

Nice.
Comment 6 Katrin Fischer 2017-08-01 05:26:57 UTC
This patch has been pushed to 16.11.x and will be in 16.11.10.
Comment 7 Katrin Fischer 2017-08-01 05:35:59 UTC
Sorry, 16.11.11!
Comment 8 Mason James 2017-08-24 13:54:59 UTC
Pushed to 16.05.x, for 16.05.16 release