Bug 36921

Summary: Incorrect error description on local title import
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: ERMAssignee: Tomás Cohen Arazi <tomascohen>
Status: Needs Signoff --- QA Contact:
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart, jonathan.field, katrin.fischer, martin.renvoize, matt.blenkinsop, pedro.amorim, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 36921: Fix error description on KBART file import

Description Tomás Cohen Arazi 2024-05-22 11:19:40 UTC
At least on the KBART import feature, if the file *extension* is not one of '.tsv' or '.csv', the displayed message is:

The file must be in .tsv or .csv format, please convert your file and try again.

I would write something like this instead:

The file extension must be either .tsv or .csv, depending on the file format. Other extensions are not accepted.
Comment 1 Katrin Fischer 2024-05-22 11:26:12 UTC
We will "fix" this and remove the note with 

Bug 36831 - Add support for .txt files to the KBART import tool 

(I filed a similar report yesterday)
Comment 2 Tomás Cohen Arazi 2024-05-22 11:34:24 UTC
Created attachment 167022 [details] [review]
Bug 36921: Fix error description on KBART file import

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 David Nind 2024-05-23 04:35:00 UTC
I had a go at testing, however I'm not seeing the error message before or after the patch is applied.

I used the test file from bug 36831

Something pops up and then disappears very quickly, and the file is not loaded. No titles are imported (as expected).
Comment 4 Owen Leonard 2024-06-04 10:56:10 UTC
I wonder if this error in the console is related:

Uncaught (in promise) TypeError: can't access property "invalid_columns", success.warnings is undefined
    addDocument webpack://koha/./koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesKBARTImport.vue?./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[5].use[0]:86
erm_24.0600000.js line 2026 > eval:86:25