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

--- Comment #197 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 201673
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201673&action=edit
Bug 35104: (follow-up) Isolate metadata decode failures in other batch loops

Proactively applies the same fix as the previous follow-up to other
places that loop over multiple records and can hit an undecodable
MARC record along the way:

- C4::ImportBatch::_batchCommitItems: an item whose MARCXML cannot be
  decoded now uses the existing import_items error/status columns
  (as already done for duplicate barcodes) instead of dying and
  aborting the rest of the record's items.
- C4::ImportBatch::BatchRevertRecords: a record whose marcxml_old
  cannot be decoded during a 'restore' revert is now flagged with
  status 'error' and counted in num_errors instead of aborting the
  whole revert job. Koha::BackgroundJob::MARCImportRevertBatch's
  progress count is updated to include num_errors.
- misc/maintenance/touch_all_biblios.pl and
  misc/maintenance/sanitize_records.pl: both call
  $biblio->metadata->record without catching the exception it throws
  on undecodable metadata (sanitize_records.pl even had a dead
  "unless ($record)" check, since record() throws rather than
  returning false). One corrupt record would silently stop either
  script partway through a potentially large run. Both now report the
  error for that biblionumber and continue with the rest.

-- 
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