[Bug 43027] New: Handle undecodable metadata gracefully when merging bibliographic records
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: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201704&action=edit Bug 43027: Handle undecodable metadata gracefully when merging bibliographic records Merging into a reference record calls ModBiblio, which can now throw Koha::Exceptions::Metadata::Invalid (bug 35104). Catch it, abort the merge (the reference record was not modified, so nothing has been merged away yet) and show the cataloguer why, instead of a raw exception or - worse - a partially-applied merge. Recoverable faults fixed during the merge are shown as a warning instead, same as the cataloguing edit form. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201704|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201730&action=edit Bug 43027: Handle undecodable metadata gracefully when merging bibliographic records Merging into a reference record calls ModBiblio, which can now throw Koha::Exceptions::Metadata::Invalid (bug 35104). Catch it, abort the merge (the reference record was not modified, so nothing has been merged away yet) and show the cataloguer why, instead of a raw exception or - worse - a partially-applied merge. Recoverable faults fixed during the merge are shown as a warning instead, same as the cataloguing edit form. Signed-off-by: Baptiste Bayche <baptiste.bayche@inlibro.com> Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> Sponsored-by: OpenFifth -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43027 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org