On /cgi-bin/koha/tools/quotes-upload.pl if you upload a CSV that is not quite right the page produces a javascript error: Uncaught TypeError: arrData[(arrData.length - 1)] is undefined To the user this is confusing as #quotes_editor table visibility remains hidden and the progress bar says 100%. Can we handle this error better? Maybe a warning on the screen letting the user know something is wrong?
Created attachment 117760 [details] [review] Bug 27869: let user know something went wrong with csv upload To test: -attempt to upload a malformed CSV file -nothing happens, check the console and see the error: Uncaught TypeError: arrData[(arrData.length - 1)] is undefined -apply patch -try again -now you should at least see a warning that something went wrong -attempt to upload a good CSV file, it should work
(In reply to Lucas Gass from comment #1) > -attempt to upload a malformed CSV file Can you suggest how to make it malformed?
Created attachment 117875 [details] bad_example.csv
(In reply to Owen Leonard from comment #2) > (In reply to Lucas Gass from comment #1) > > -attempt to upload a malformed CSV file > > Can you suggest how to make it malformed? I have attached an example file.
Created attachment 117949 [details] [review] Bug 27869: let user know something went wrong with csv upload To test: -attempt to upload a malformed CSV file -nothing happens, check the console and see the error: Uncaught TypeError: arrData[(arrData.length - 1)] is undefined -apply patch -try again -now you should at least see a warning that something went wrong -attempt to upload a good CSV file, it should work Signed-off-by: David Nind <david@davidnind.com>
Created attachment 119071 [details] [review] Bug 27869: let user know something went wrong with csv upload To test: -attempt to upload a malformed CSV file -nothing happens, check the console and see the error: Uncaught TypeError: arrData[(arrData.length - 1)] is undefined -apply patch -try again -now you should at least see a warning that something went wrong -attempt to upload a good CSV file, it should work Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Pushed to master for 21.05, thanks to everybody involved!
Looks like it depends a bit on Bug 27251 not in 20.11.x Not pushed to 20.11.x