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

--- Comment #1 from babar junaid <[email protected]> ---
Created attachment 211191
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211191&action=edit
Bug 44046: Report records that could not be exported

Bug 44046: Report records that could not be exported

Koha::Exporter::Record skipped any record whose MARC could not be read (or
encoded as ISO 2709) and only logged it, for ISO 2709 at info level. Neither
misc/export_records.pl nor its caller could tell the export came out short.

export() now returns the records it skipped, each with a reason, logs them at
warn level, and export_records.pl prints them and a count on STDERR.

Test plan:
1. prove t/db_dependent/Exporter/Record.t
   The new checks fail without the patch.
2. Break one record: in biblio_metadata, put a control character (0x1F)
   into its metadata.
3. misc/export_records.pl --format=xml --filename=/tmp/out.xml
   --starting_biblionumber=<n> --ending_biblionumber=<n+1>
4. Without the patch: no line names the record, the file lacks it.
5. With the patch: "Record <n> could not be exported: the record could not
   be read" and "1 record(s) could not be exported." on STDERR.
6. Repeat 3 with --format=iso2709.

Sponsored-by: Koha Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to