https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35104

--- Comment #196 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 201672
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201672&action=edit
Bug 35104: (follow-up) Surface invalid metadata errors during batch import

QA testing showed that importing a staged record whose MARCXML cannot
be decoded (and cannot be recovered by non-XML character stripping) now
throws Koha::Exceptions::Metadata::Invalid from Koha::Biblio::Metadata::store,
but C4::ImportBatch::BatchCommitRecords had no handling for it. The
exception propagated out of the whole batch commit job, silently marking
the entire job as failed with no way for staff to see which record or
why - only visible in the server logs.

BatchCommitRecords now catches this specific exception per-record,
rolls back that record's changes, flags it with status 'error' and
records the decoding error in import_records.import_error, and
continues committing the rest of the batch. The new count is reported
back through Koha::BackgroundJob::MARCImportCommitBatch's job report
and misc/commit_file.pl's summary, and the per-record error message is
now shown in the "Manage staged MARC records" table.

Also fixes a "Use of uninitialized value in sprintf" warning in
Koha::Exceptions::Metadata::full_message, hit every time this exception
is raised for metadata that has not yet been stored (no id yet).

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to