Bug 36942

Summary: Throw an exception if a KBART file can't be read
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: ERMAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: Signed Off --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: claire.hernandez, david, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: unspecifiedKeywords: Academy, no-sandbox
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 36831    
Bug Blocks:    
Attachments: Bug 36942: Use an exception for a failed KBART file parse
Bug 36942: Use an exception for a failed KBART file parse
Bug 36942: Use an exception for a failed KBART file parse

Description Matt Blenkinsop 2024-05-23 11:19:03 UTC
Currently we warn an error message if there is an error parsing a KBART file. We should change this to use an exception
Comment 1 Matt Blenkinsop 2024-07-03 11:19:38 UTC
Created attachment 168439 [details] [review]
Bug 36942: Use an exception for a failed KBART file parse

Test plan:
1) prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t
Comment 2 David Nind 2025-01-03 01:25:39 UTC
Note: A dependent bug no longer applies (and is also Failed QA).
Comment 3 claire.hernandez@biblibre.com 2025-04-02 11:48:08 UTC
(same as David, so I put it in "DNA" for review)
Comment 4 David Nind 2025-05-19 14:09:03 UTC
Getting a sha1/fake ancestor error.

git bz apply 36942

Bug 36942 Depends on bug 36831 (Signed Off)
Follow? [(y)es, (n)o] y

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

179679 - Bug 36831: Add a method to determine the file delimiter
179680 - Bug 36831: Move logic from the background job to the Title object class
179681 - Bug 36831: Add unit test
179682 - Bug 36831: Allow for multiple file types

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36831: Add a method to determine the file delimiter
Applying: Bug 36831: Move logic from the background job to the Title object class
Applying: Bug 36831: Add unit test
Applying: Bug 36831: Allow for multiple file types

Bug 36942 - Throw an exception if a KBART file can't be read

168439 - Bug 36942: Use an exception for a failed KBART file parse

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36942: Use an exception for a failed KBART file parse
error: sha1 information is lacking or useless (Koha/ERM/EHoldings/Title.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 36942: Use an exception for a failed KBART file parse
Comment 5 Matt Blenkinsop 2025-05-19 14:14:25 UTC
Created attachment 182608 [details] [review]
Bug 36942: Use an exception for a failed KBART file parse

Test plan:
1) prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t
Comment 6 David Nind 2025-05-19 14:37:06 UTC
Created attachment 182610 [details] [review]
Bug 36942: Use an exception for a failed KBART file parse

Test plan:
1) prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

Signed-off-by: David Nind <david@davidnind.com>