Bug 36921 - Incorrect error description on local title import
Summary: Incorrect error description on local title import
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 11:19 UTC by Tomás Cohen Arazi
Modified: 2024-06-04 10:56 UTC (History)
8 users (show)

See Also:
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 (1.32 KB, patch)
2024-05-22 11:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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