Created attachment 174646 [details] example of KBART file not imported Tested today in PTFS MARC21 Sandbox - eHoldings > Local > Packages: create a local package - eHoldings > Local > Titles > Import from KBART > import a kbart file (I tested with several from https://bacon.abes.fr/exporter.html site) > To the following local package: select the local package created before > Keep unchecked the checkbox "Create linked bibliographic record:" (the same issue is present if it checked) Submit During a few second the message "Submitting" appears, and that is all, the records are not imported I can see this error in Console : EHoldingsLocalTitlesKBARTImport.vue:159 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'invalid_columns') at EHoldingsLocalTitles…RTImport.vue:159:42
note that the file has an extra column "bestppn", but even if I remove this column the error persists
Created attachment 174680 [details] [review] Bug 38466: Fix error messages in KBART import Test plan: 1) Download the file attached to this bug and save it as a .txt file 2) In the ERM module, create a local package 3) Go to the local titles page and click Import from KBART file 4) Select your package and the saved file and click import 5) The import will fail with just a console error 6) Apply patch and run a restart_all and a yarn js:build 7) Repeat step 4, it should now display an error saying the file must be either TSV or CSV 8) Convert the file to either of those two formats and repeat step 4 9) The file should now import successfully, with a message saying that there is an additional column "bestppn" that will not be imported
ok, I thought the CSV or TSV filetype was checked against the structure of the file, not it's extension. I am testing
In bug 36831 there is some work to make the filetype irrelevant but it needs a bit more work done to be ready
Indeed the import is working well if the file have an extension ".tsv". So the title of the bug is wrong. I suppose it should be something like "Missing warning if the import of a KBART file fails because of wrong extension" ?
Created attachment 174737 [details] [review] Bug 38466: Fix error messages in KBART import Test plan: 1) Download the file attached to this bug and save it as a .txt file 2) In the ERM module, create a local package 3) Go to the local titles page and click Import from KBART file 4) Select your package and the saved file and click import 5) The import will fail with just a console error 6) Apply patch and run a restart_all and a yarn js:build 7) Repeat step 4, it should now display an error saying the file must be either TSV or CSV 8) Convert the file to either of those two formats and repeat step 4 9) The file should now import successfully, with a message saying that there is an additional column "bestppn" that will not be imported Signed-off-by: msaby <mathsabypro@gmail.com>
Thanks, I tested on a sandbox, everything is ok
Created attachment 174920 [details] [review] Bug 38466: Fix error messages in KBART import Test plan: 1) Download the file attached to this bug and save it as a .txt file 2) In the ERM module, create a local package 3) Go to the local titles page and click Import from KBART file 4) Select your package and the saved file and click import 5) The import will fail with just a console error 6) Apply patch and run a restart_all and a yarn js:build 7) Repeat step 4, it should now display an error saying the file must be either TSV or CSV 8) Convert the file to either of those two formats and repeat step 4 9) The file should now import successfully, with a message saying that there is an additional column "bestppn" that will not be imported Signed-off-by: msaby <mathsabypro@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>