Bug 30739

Summary: Fatal errors during MARC import force status of "Importing" forever
Product: Koha Reporter: David Cook <dcook>
Component: MARC Bibliographic record staging/importAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: cmkelleymls, jheanelle.foster, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30738
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28152
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30896
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27421
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32638
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description David Cook 2022-05-12 04:02:21 UTC
We need to be careful when processing MARC imports. 

I was trying to import 1 MARC record with 1 item, and it kept getting stuck as 0% job progress and "Importing" status forever.

Thanks to Bug 30738, I saw this was due to the following error:
[2022/05/12 03:37:37] [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'coded_location_qualifier' at row 1 at /kohadevbox/koha/Koha/Object.pm line 170
 main::__ANON__ /kohadevbox/koha/tools/manage-marc-import.pl (339)

--

Either we need to fail the whole import or we need to catch the error and just report on it at the end.
Comment 1 David Cook 2022-05-12 04:02:58 UTC
(In reply to David Cook from comment #0)
> Either we need to fail the whole import or we need to catch the error and
> just report on it at the end.

The better option is probably to report on it at the end, because otherwise we'd need to run a full reversion and the MARC import reversion is not very good.
Comment 2 David Cook 2022-06-27 00:43:04 UTC
*** Bug 31043 has been marked as a duplicate of this bug. ***
Comment 3 David Cook 2022-06-27 00:47:15 UTC
*** Bug 28128 has been marked as a duplicate of this bug. ***
Comment 4 David Cook 2022-06-27 00:49:57 UTC
Increasing the severity of this one since it seems to be a common problem annoying a fair number of people.
Comment 5 Jonathan Druart 2022-11-11 12:14:23 UTC
How is this behaving after bug 27421?
Comment 6 David Cook 2023-01-16 04:26:07 UTC
It looks like it works since bug 27421

The item is shown as ignored in the output, and I can't find a warning anywhere explaining why the item was ignored, but it's better than the job getting stuck as 0% and staying "Importing" forever...