[Bug 44073] New: Automatic linker ignores the INVALID_METADATA status returned for unrepairable records
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 Bug ID: 44073 Summary: Automatic linker ignores the INVALID_METADATA status returned for unrepairable records Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal 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 Target Milestone: --- Follow-up to bug 43776. Bug 43776 changes svc/cataloguing/automatic_linker.pl to return { "status": "INVALID_METADATA" } when the posted form data cannot be turned into a valid record. The caller in koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt only handles the statuses UNAUTHORIZED and OK in its success switch, so INVALID_METADATA is silently ignored: the cataloguer clicks the automatic linker and nothing visibly happens. Fix: add an INVALID_METADATA case to the switch that tells the cataloguer the record contains data that cannot be saved, and that the heading links could not be updated. Test plan: 1. Apply the patch (and bug 43776). 2. Open a record in the basic cataloguing editor. 3. Make the form data unrepairable (for example put a control character in the leader, field 000). 4. Run the automatic linker. 5. Confirm a clear message is shown instead of nothing happening. 6. Run the automatic linker on a valid record and confirm it still updates the heading links. 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=44073 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 Depends on| |43776 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43776 [Bug 43776] TransformHtmlToMarc should repair and report invalid characters rather than silently stripping them -- 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=44073 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211523 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211523&action=edit Bug 44073: Tell the cataloguer when the automatic linker cannot run Bug 43776 makes svc/cataloguing/automatic_linker.pl return { "status": "INVALID_METADATA" } when the posted form data cannot be turned into a valid record. The caller in addbiblio.tt only handled UNAUTHORIZED and OK, so for INVALID_METADATA nothing visible happened when the cataloguer clicked "Link authorities automatically". Add an INVALID_METADATA case that shows a clear message. To test: 1. Apply the patch (and bug 43776) and restart_all 2. Open a new record in the basic cataloguing editor 3. Make the data unrepairable, for example put a control character (0x1F) in the leader 4. Click "Link authorities automatically" => A message says the heading links could not be updated because the record contains data that cannot be saved 5. On a valid record, click it again => Heading links are updated as before 6. yarn cypress run --spec t/cypress/integration/Cataloguing/AutomaticLinker_spec.ts => SUCCESS: Tests pass Sponsored-by: OpenFifth Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211523|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 --- Comment #2 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 211548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211548&action=edit Bug 44073: Tell the cataloguer when the automatic linker cannot run Bug 43776 makes svc/cataloguing/automatic_linker.pl return { "status": "INVALID_METADATA" } when the posted form data cannot be turned into a valid record. The caller in addbiblio.tt only handled UNAUTHORIZED and OK, so for INVALID_METADATA nothing visible happened when the cataloguer clicked "Link authorities automatically". Add an INVALID_METADATA case that shows a clear message. To test: 1. Apply the patch (and bug 43776) and restart_all 2. Open a new record in the basic cataloguing editor 3. Make the data unrepairable, for example put a control character (0x1F) in the leader 4. Click "Link authorities automatically" => A message says the heading links could not be updated because the record contains data that cannot be saved 5. On a valid record, click it again => Heading links are updated as before 6. yarn cypress run --spec t/cypress/integration/Cataloguing/AutomaticLinker_spec.ts => SUCCESS: Tests pass Sponsored-by: OpenFifth Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adolfo.rodriguez@xercode.es --- Comment #3 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Tested on top of bug 43776, in the basic editor, replacing the leader with 0x1F characters from the browser console: - Before the patch, clicking "Link authorities automatically" did nothing visible: no alert and no results box. - After the patch, an alert says the heading links could not be updated because the record contains data that cannot be saved. - On a valid record the linker still works and shows the "Automatic authority link results" box. The QA script is happy. I did not run the Cypress test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44073 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jan.kissig@th-wildau.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org