https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #24 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198301&action=edit Bug 42032: (follow-up) Use MARC-in-JSON for authority action log diffs Mirrors the bug 42188 main commit for biblios. Replace the custom _marc_record_to_diffable helper with MARC::Record::MiJ's to_mij_structure so AUTHORITIES action log diffs use the same MARC-in-JSON shape as CATALOGUING diffs. Add Koha::Authority::_unblessed_for_log to expose only the auth_header columns that exist independently of the MARC record (authtypecode, origincode, linkid), avoiding duplication of MARC-derived data (heading, authtrees), raw marcxml, and system timestamps. The explicit whitelist also removes the need for the post-hoc empty-field stripping added in a previous follow-up. Test plan: 1. prove t/db_dependent/AuthoritiesMarc.t 2. Enable AuthoritiesLog. Create, edit, and delete an authority via the staff UI, then inspect action_logs.diff in the DB: - _marc contains MiJ shape { leader: "...", fields: [ { tag: {...} }, ... ] } - Changes to heading fields produce diffs on _marc.fields[N].TAG.subfields[0].a - The diff no longer carries a redundant top-level heading entry (it's MARC-derived and now only appears in _marc). 3. prove t/db_dependent/Log.t 4. prove t/db_dependent/Koha/Authority.t 5. prove t/db_dependent/Koha/Biblio.t -- You are receiving this mail because: You are watching all bug changes.