https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027
Bug ID: 43027
Summary: Handle undecodable metadata gracefully when merging
bibliographic records
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Cataloging
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Depends on: 35104
Target Milestone: ---
Merging into a reference record calls ModBiblio, which can now throw
Koha::Exceptions::Metadata::Invalid (bug 35104) if the merged result
cannot be saved. cataloguing/merge.pl did not handle this, so the
cataloguer would see a raw exception with no indication of what
happened to the merge.
This patch catches the exception, aborts the merge (the reference
record was not modified, since ModBiblio failed before anything was
merged away), and shows a clear message. A recoverable fault fixed
during the merge is shown as a warning instead, the same as the
cataloguing edit form (bug 43025).
Depends on bug 35104.
Test plan:
1. Apply this patch on top of bug 35104.
2. Merge two normal bibliographic records as usual. Confirm the merge
still completes successfully and the report screen displays as
before.
3. Arrange for the merge result to be unrecoverable (e.g. temporarily
force Koha::Biblio::Metadata::store to throw
Koha::Exceptions::Metadata::Invalid for this merge). Attempt the
merge. Confirm a clear error is shown, the reference record is
unchanged, and no partial merge occurred (the other record(s) were
not deleted/merged away).
4. Arrange for the merge result to require automatic repair (a
recoverable fault). Confirm the merge completes and the report
screen shows a warning describing what was fixed.
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35104
[Bug 35104] We should warn when attempting to save MARC records that contain
characters invalid in XML
--
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]
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/