[Bug 42032] New: Add diff support to AUTHORITIES action logs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Bug ID: 42032 Summary: Add diff support to AUTHORITIES action logs Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Transaction logs Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Blocks: 37940 The action logging in C4/AuthoritiesMarc.pm for authority record changes currently passes unstructured text (or the literal string 'authority') to logaction(). No structured diff is generated in the action_logs.diff column. Affected calls in C4/AuthoritiesMarc.pm: - AUTHORITIES/ADD (~line 688): logaction( "AUTHORITIES", "ADD", $authid, "authority" ) - AUTHORITIES/DELETE (~line 755): logaction( "AUTHORITIES", "DELETE", $authid, "authority" ) - AUTHORITIES/MODIFY (~line 792): logaction( "AUTHORITIES", "MODIFY", $authid, "authority BEFORE=>" . $oldrecord->as_formatted ) This bug covers updating these calls to pass structured data. A Koha::Authority object (or its unblessed hashref) should be passed as $infos and $original so that the structured diff mechanism can generate a proper before/after comparison. The MODIFY case already captures the old record; this should be passed as $original in the new structured format. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37940 [Bug 37940] [OMNIBUS] All modification logged via action logs should include original to create JSON diff -- 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=42032 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=42032 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195021 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195021&action=edit Bug 42032: Include MARC field changes in AUTHORITIES diff logs The AUTHORITIES action log entries for authority operations previously stored minimal data: ADD and DELETE logged just the string "authority", while MODIFY logged a raw MARC-formatted dump of the pre-change record as a plain text string ("authority BEFORE=>..."). None of these populated the diff column. This patch updates AddAuthority, ModAuthority and DelAuthority in C4/AuthoritiesMarc.pm to follow the same pattern introduced for biblios in bug 40135: passing combined hashrefs to logaction so that the diff column is automatically populated with Struct::Diff JSON. The combined hashref contains the auth_header table columns (authtypecode, heading, origincode, etc. — excluding the raw marcxml blob) plus a _marc key built by the new _marc_record_to_diffable helper, which converts a MARC::Record into a tag => array-of-formatted-strings structure readable by the existing diff viewer. A new _authority_log_data helper packages the authority unblessed data and MARC record into the combined hashref, keeping the three call sites concise. For ADD, the logaction is now emitted after the authority record has been fully stored (after _after_authority_action_hooks), so the diff captures the complete saved state. For MODIFY, the before-state is captured from Koha::Authorities before calling AddAuthority, and the after-state is read back once AddAuthority has committed the new data. For DELETE, the MARC is captured before the authority is removed. The diff column for MODIFY will now show both authority table column changes (e.g. heading) and MARC field-level changes (e.g. _marc.151.0) in the existing diff viewer table in the log viewer. Tests are added to verify that ADD, MODIFY, and DELETE all populate the diff column and that _marc content is captured correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40135 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40135 [Bug 40135] Record diff in action logs when modifying a bibliographic record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 David Nind <david@davidnind.com> 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=42032 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195021|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=42032 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 195024 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195024&action=edit Bug 42032: Include MARC field changes in AUTHORITIES diff logs The AUTHORITIES action log entries for authority operations previously stored minimal data: ADD and DELETE logged just the string "authority", while MODIFY logged a raw MARC-formatted dump of the pre-change record as a plain text string ("authority BEFORE=>..."). None of these populated the diff column. This patch updates AddAuthority, ModAuthority and DelAuthority in C4/AuthoritiesMarc.pm to follow the same pattern introduced for biblios in bug 40135: passing combined hashrefs to logaction so that the diff column is automatically populated with Struct::Diff JSON. The combined hashref contains the auth_header table columns (authtypecode, heading, origincode, etc. — excluding the raw marcxml blob) plus a _marc key built by the new _marc_record_to_diffable helper, which converts a MARC::Record into a tag => array-of-formatted-strings structure readable by the existing diff viewer. A new _authority_log_data helper packages the authority unblessed data and MARC record into the combined hashref, keeping the three call sites concise. For ADD, the logaction is now emitted after the authority record has been fully stored (after _after_authority_action_hooks), so the diff captures the complete saved state. For MODIFY, the before-state is captured from Koha::Authorities before calling AddAuthority, and the after-state is read back once AddAuthority has committed the new data. For DELETE, the MARC is captured before the authority is removed. The diff column for MODIFY will now show both authority table column changes (e.g. heading) and MARC field-level changes (e.g. _marc.151.0) in the existing diff viewer table in the log viewer. Tests are added to verify that ADD, MODIFY, and DELETE all populate the diff column and that _marc content is captured correctly. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds a release notes| |'diff' to the action logs | |when modifying an authority | |record (creating, | |modifying, and deleting). | | | |Previously, no diff was | |recorded (although some | |information was recorded in | |the Info column). CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #3 from Lisette Scheer <lisette@bywatersolutions.com> --- ADD & DELETE both have some blank fields (linkid heading origincode authtrees) that weren't filled in, otherwise worked great. QA failed: [FAIL] C4/AuthoritiesMarc.pm Result: [FAIL] C4/AuthoritiesMarc.pm FAIL critic Variable declared in conditional statement at line 756, column 9. Declare variables outside of the condition. (Severity: 5) "$original_marc" is declared but not used at line 802, column 5. Unused variables clutter code and make it harder to read. (Severity: 3) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195473&action=edit Bug 42032: (follow-up) Fix QA issues and strip blank fields from authority logs - Declare \$deleted_marc outside conditional to satisfy perlcritic - Remove unused \$original_marc variable - Strip undef and empty fields from _authority_log_data to avoid blank linkid/heading/origincode/authtrees entries in ADD and DELETE logs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 David Nind <david@davidnind.com> 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=42032 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195024|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=42032 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195473|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=42032 --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 195712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195712&action=edit Bug 42032: Include MARC field changes in AUTHORITIES diff logs The AUTHORITIES action log entries for authority operations previously stored minimal data: ADD and DELETE logged just the string "authority", while MODIFY logged a raw MARC-formatted dump of the pre-change record as a plain text string ("authority BEFORE=>..."). None of these populated the diff column. This patch updates AddAuthority, ModAuthority and DelAuthority in C4/AuthoritiesMarc.pm to follow the same pattern introduced for biblios in bug 40135: passing combined hashrefs to logaction so that the diff column is automatically populated with Struct::Diff JSON. The combined hashref contains the auth_header table columns (authtypecode, heading, origincode, etc. — excluding the raw marcxml blob) plus a _marc key built by the new _marc_record_to_diffable helper, which converts a MARC::Record into a tag => array-of-formatted-strings structure readable by the existing diff viewer. A new _authority_log_data helper packages the authority unblessed data and MARC record into the combined hashref, keeping the three call sites concise. For ADD, the logaction is now emitted after the authority record has been fully stored (after _after_authority_action_hooks), so the diff captures the complete saved state. For MODIFY, the before-state is captured from Koha::Authorities before calling AddAuthority, and the after-state is read back once AddAuthority has committed the new data. For DELETE, the MARC is captured before the authority is removed. The diff column for MODIFY will now show both authority table column changes (e.g. heading) and MARC field-level changes (e.g. _marc.151.0) in the existing diff viewer table in the log viewer. Tests are added to verify that ADD, MODIFY, and DELETE all populate the diff column and that _marc content is captured correctly. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 195713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195713&action=edit Bug 42032: (follow-up) Fix QA issues and strip blank fields from authority logs - Declare \$deleted_marc outside conditional to satisfy perlcritic - Remove unused \$original_marc variable - Strip undef and empty fields from _authority_log_data to avoid blank linkid/heading/origincode/authtrees entries in ADD and DELETE logs Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #7 from David Nind <david@davidnind.com> --- Have signed off, although there are some QA fails about pod coverage: qa Tag v25.05.00-1 found in /kohadevbox/koha — checking out branch main in /kohadevbox/qa-test-tools Already on 'main' Your branch is up to date with 'origin/main'. testing 2 commit(s) (applied to 4b18661 'd5 Bug 40135: (follow-up) Add tests f') Processing files [RUNNING] C4/AuthoritiesMarc.pm [RUNNING] t/db_dependent/AuthoritiesMarc.t [PASS] t/db_dependent/AuthoritiesMarc.t [FAIL] C4/AuthoritiesMarc.pm Result: [FAIL] C4/AuthoritiesMarc.pm FAIL pod_coverage sub _get_authid_subfield has no pod coverage. sub _marc_record_to_diffable has no pod coverage. sub _merge_newtag has no pod coverage. sub _authority_log_data has no pod coverage. [PASS] t/db_dependent/AuthoritiesMarc.t Processing additional checks PASS! * Was this bug sponsored by anyone? Running tests (1) * Proving /kohadevbox/koha/t/db_dependent/AuthoritiesMarc.t PASS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement adds a |This enhancement adds a release notes|'diff' to the action logs |'diff' to the action logs |when modifying an authority |for authority record |record (creating, |changes (creating, |modifying, and deleting). |modifying, and deleting). | | |Previously, no diff was |Previously, no diff was |recorded (although some |recorded (although some |information was recorded in |information was recorded in |the Info column). |the Info column). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42188 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42188 [Bug 42188] Fix display regressions in action logs for biblio changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Lisette Scheer <lisette@bywatersolutions.com> --- Worked great, I did my best with the pod coverage. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195712|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=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195713|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=42032 --- Comment #9 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 196336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196336&action=edit Bug 42032: Include MARC field changes in AUTHORITIES diff logs The AUTHORITIES action log entries for authority operations previously stored minimal data: ADD and DELETE logged just the string "authority", while MODIFY logged a raw MARC-formatted dump of the pre-change record as a plain text string ("authority BEFORE=>..."). None of these populated the diff column. This patch updates AddAuthority, ModAuthority and DelAuthority in C4/AuthoritiesMarc.pm to follow the same pattern introduced for biblios in bug 40135: passing combined hashrefs to logaction so that the diff column is automatically populated with Struct::Diff JSON. The combined hashref contains the auth_header table columns (authtypecode, heading, origincode, etc. — excluding the raw marcxml blob) plus a _marc key built by the new _marc_record_to_diffable helper, which converts a MARC::Record into a tag => array-of-formatted-strings structure readable by the existing diff viewer. A new _authority_log_data helper packages the authority unblessed data and MARC record into the combined hashref, keeping the three call sites concise. For ADD, the logaction is now emitted after the authority record has been fully stored (after _after_authority_action_hooks), so the diff captures the complete saved state. For MODIFY, the before-state is captured from Koha::Authorities before calling AddAuthority, and the after-state is read back once AddAuthority has committed the new data. For DELETE, the MARC is captured before the authority is removed. The diff column for MODIFY will now show both authority table column changes (e.g. heading) and MARC field-level changes (e.g. _marc.151.0) in the existing diff viewer table in the log viewer. Tests are added to verify that ADD, MODIFY, and DELETE all populate the diff column and that _marc content is captured correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #10 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 196337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196337&action=edit Bug 42032: (follow-up) Fix QA issues and strip blank fields from authority logs - Declare \$deleted_marc outside conditional to satisfy perlcritic - Remove unused \$original_marc variable - Strip undef and empty fields from _authority_log_data to avoid blank linkid/heading/origincode/authtrees entries in ADD and DELETE logs Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #11 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 196338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196338&action=edit Bug 42032: (QA follow-up) fix pod warnings Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- We should hold off on pushing this one until we've come to a conclusion on bug 42188 and updated this bug to reflect those changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |BLOCKED CC| |lucas@bywatersolutions.com --- Comment #13 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- setting to BLOCKED until 42188 is ready -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196336|0 |1 is obsolete| | Attachment #196337|0 |1 is obsolete| | Attachment #196338|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=42032 --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197953&action=edit Bug 42032: Include MARC field changes in AUTHORITIES diff logs The AUTHORITIES action log entries for authority operations previously stored minimal data: ADD and DELETE logged just the string "authority", while MODIFY logged a raw MARC-formatted dump of the pre-change record as a plain text string ("authority BEFORE=>..."). None of these populated the diff column. This patch updates AddAuthority, ModAuthority and DelAuthority in C4/AuthoritiesMarc.pm to follow the same pattern introduced for biblios in bug 40135: passing combined hashrefs to logaction so that the diff column is automatically populated with Struct::Diff JSON. The combined hashref contains the auth_header table columns (authtypecode, heading, origincode, etc. — excluding the raw marcxml blob) plus a _marc key built by the new _marc_record_to_diffable helper, which converts a MARC::Record into a tag => array-of-formatted-strings structure readable by the existing diff viewer. A new _authority_log_data helper packages the authority unblessed data and MARC record into the combined hashref, keeping the three call sites concise. For ADD, the logaction is now emitted after the authority record has been fully stored (after _after_authority_action_hooks), so the diff captures the complete saved state. For MODIFY, the before-state is captured from Koha::Authorities before calling AddAuthority, and the after-state is read back once AddAuthority has committed the new data. For DELETE, the MARC is captured before the authority is removed. The diff column for MODIFY will now show both authority table column changes (e.g. heading) and MARC field-level changes (e.g. _marc.151.0) in the existing diff viewer table in the log viewer. Tests are added to verify that ADD, MODIFY, and DELETE all populate the diff column and that _marc content is captured correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197954&action=edit Bug 42032: (follow-up) Fix QA issues and strip blank fields from authority logs - Declare \$deleted_marc outside conditional to satisfy perlcritic - Remove unused \$original_marc variable - Strip undef and empty fields from _authority_log_data to avoid blank linkid/heading/origincode/authtrees entries in ADD and DELETE logs Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197955&action=edit Bug 42032: (QA follow-up) fix pod warnings Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197956&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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197957&action=edit Bug 42032: (follow-up) Write state JSON to AUTHORITIES info column Mirrors bug 42188's biblio info-column convention. Generalise the CATALOGUING-only info-column rewrite branch in C4::Log::logaction to cover AUTHORITIES as well, using a module-aware prefix map so each module gets its own prefix ("biblio" / "authority"). For AUTHORITIES this means MODIFY now stores "authority {pre-change JSON}" and DELETE stores "authority {final-state JSON}", while ADD stays bare "authority" (the call site passes the string directly and ADD is guarded anyway). The biblio behaviour is preserved bit-for-bit. Test plan: 1. prove t/db_dependent/AuthoritiesMarc.t 2. Enable AuthoritiesLog. Create / modify / delete an authority via the staff UI, then check action_logs: - ADD row's info column reads just "authority" - MODIFY row's info column reads "authority { ... pre-change JSON ... }" - DELETE row's info column reads "authority { ... final-state JSON ... }" 3. prove t/db_dependent/Koha/Biblio.t 4. prove t/db_dependent/Log.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #19 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197958&action=edit Bug 42032: (follow-up) Pretty-render authority info column in log viewer Mirrors bug 42188's biblio log-viewer rendering. Generalise the biblio-only renderCatalogInfo() helper in viewlog.js to also match the "authority <JSON>" prefix introduced by the previous follow-up, and rename it to renderRecordInfo() to reflect its wider scope. The existing fmtJsonValue() helper already handles MiJ's nested arrays of subfield objects, so no rendering changes are needed beyond the regex and name. Test plan: 1. Enable AuthoritiesLog. 2. Create, edit, and delete an authority via the staff UI. 3. Go to Tools -> Log viewer, filter by module=Authorities. 4. Verify: - ADD row's info cell shows just "authority". - MODIFY and DELETE rows' info cells render as a nested list (auth_header columns plus _marc leader + fields array). - Diff column still renders the before/after struct-diff table. 5. Re-check a biblio (CataloguingLog) entry: still renders as before. 6. Re-check a MEMBERS entry: untouched. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|40135 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40135 [Bug 40135] Record diff in action logs when modifying a bibliographic record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_26_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #20 from Lisette Scheer <lisette@bywatersolutions.com> --- There's inconsistency in the diff column: ADD/DELETE has one _marc field with all the relevant fields in subfield MODIFY has multiple _marc.fields.0.005 and also included lots of blanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197953|0 |1 is obsolete| | Attachment #197954|0 |1 is obsolete| | Attachment #197955|0 |1 is obsolete| | Attachment #197956|0 |1 is obsolete| | Attachment #197957|0 |1 is obsolete| | Attachment #197958|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=42032 --- Comment #21 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198298&action=edit Bug 42032: Include MARC field changes in AUTHORITIES diff logs The AUTHORITIES action log entries for authority operations previously stored minimal data: ADD and DELETE logged just the string "authority", while MODIFY logged a raw MARC-formatted dump of the pre-change record as a plain text string ("authority BEFORE=>..."). None of these populated the diff column. This patch updates AddAuthority, ModAuthority and DelAuthority in C4/AuthoritiesMarc.pm to follow the same pattern introduced for biblios in bug 40135: passing combined hashrefs to logaction so that the diff column is automatically populated with Struct::Diff JSON. The combined hashref contains the auth_header table columns (authtypecode, heading, origincode, etc. — excluding the raw marcxml blob) plus a _marc key built by the new _marc_record_to_diffable helper, which converts a MARC::Record into a tag => array-of-formatted-strings structure readable by the existing diff viewer. A new _authority_log_data helper packages the authority unblessed data and MARC record into the combined hashref, keeping the three call sites concise. For ADD, the logaction is now emitted after the authority record has been fully stored (after _after_authority_action_hooks), so the diff captures the complete saved state. For MODIFY, the before-state is captured from Koha::Authorities before calling AddAuthority, and the after-state is read back once AddAuthority has committed the new data. For DELETE, the MARC is captured before the authority is removed. The diff column for MODIFY will now show both authority table column changes (e.g. heading) and MARC field-level changes (e.g. _marc.151.0) in the existing diff viewer table in the log viewer. Tests are added to verify that ADD, MODIFY, and DELETE all populate the diff column and that _marc content is captured correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #22 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198299 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198299&action=edit Bug 42032: (follow-up) Fix QA issues and strip blank fields from authority logs - Declare \$deleted_marc outside conditional to satisfy perlcritic - Remove unused \$original_marc variable - Strip undef and empty fields from _authority_log_data to avoid blank linkid/heading/origincode/authtrees entries in ADD and DELETE logs Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #23 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198300 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198300&action=edit Bug 42032: (QA follow-up) fix pod warnings Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #25 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198302 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198302&action=edit Bug 42032: (follow-up) Write state JSON to AUTHORITIES info column Mirrors bug 42188's biblio info-column convention. Generalise the CATALOGUING-only info-column rewrite branch in C4::Log::logaction to cover AUTHORITIES as well, using a module-aware prefix map so each module gets its own prefix ("biblio" / "authority"). For AUTHORITIES this means MODIFY now stores "authority {pre-change JSON}" and DELETE stores "authority {final-state JSON}", while ADD stays bare "authority" (the call site passes the string directly and ADD is guarded anyway). The biblio behaviour is preserved bit-for-bit. Test plan: 1. prove t/db_dependent/AuthoritiesMarc.t 2. Enable AuthoritiesLog. Create / modify / delete an authority via the staff UI, then check action_logs: - ADD row's info column reads just "authority" - MODIFY row's info column reads "authority { ... pre-change JSON ... }" - DELETE row's info column reads "authority { ... final-state JSON ... }" 3. prove t/db_dependent/Koha/Biblio.t 4. prove t/db_dependent/Log.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #26 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198303 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198303&action=edit Bug 42032: (follow-up) Pretty-render authority info column in log viewer Mirrors bug 42188's biblio log-viewer rendering. Generalise the biblio-only renderCatalogInfo() helper in viewlog.js to also match the "authority <JSON>" prefix introduced by the previous follow-up, and rename it to renderRecordInfo() to reflect its wider scope. The existing fmtJsonValue() helper already handles MiJ's nested arrays of subfield objects, so no rendering changes are needed beyond the regex and name. Test plan: 1. Enable AuthoritiesLog. 2. Create, edit, and delete an authority via the staff UI. 3. Go to Tools -> Log viewer, filter by module=Authorities. 4. Verify: - ADD row's info cell shows just "authority". - MODIFY and DELETE rows' info cells render as a nested list (auth_header columns plus _marc leader + fields array). - Diff column still renders the before/after struct-diff table. 5. Re-check a biblio (CataloguingLog) entry: still renders as before. 6. Re-check a MEMBERS entry: untouched. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198304&action=edit Bug 42032: (follow-up) Eliminate phantom indicator diffs on authority MODIFY Authority MODIFY action log diffs were emitting bogus entries for every field with a default ' ' indicator on every save, producing output like: _marc.fields.1.040.ind1 ' ' ' ' _marc.fields.1.040.ind2 ' ' ' ' _marc.fields.2.150.ind1 ' ' ' ' _marc.fields.3.667.ind1 ' ' ' ' ... even when only a single subfield was edited. Root cause: Struct::Diff treats a utf8-flagged ' ' as different from a non-utf8 ' ' SV, even though Perl's eq returns true. ModAuthority was sourcing the two sides of the diff from different parse paths: - $oldrecord = GetAuthority($authid) -> MARC::Record->new_from_xml(...) -> indicators arrive utf8-flagged - $record (the "after" side) was the in-memory MARC built by the editor from CGI parameters -> indicators are bare byte strings The XML round-trip through AddAuthority normalises the stored copy, but the in-memory $record we passed to logaction had not been re-parsed, so every default indicator looked like a change to Struct::Diff. Fix: after AddAuthority commits the new state, re-read it via $new_authority->record and pass that to _authority_log_data. Both sides of the diff now traverse the same new_from_xml path, utf8 flags match, and Struct::Diff falls silent on unchanged indicators. This is the symmetric counterpart of how biblios already work in C4::Biblio: ModBiblio sources both $original_marc and $updated_marc_log through Koha::Biblio::Metadata::record_strip_nonxml (which also calls new_from_xml), so biblios don't hit this. The deeper asymmetry between in-memory editor MARC and stored MARC (default indicators only get normalised on the XML round-trip) is left for a separate bug; this patch keeps the action log diff clean without touching the storage path. Test plan: 1. prove t/db_dependent/AuthoritiesMarc.t 2. Enable AuthoritiesLog. Edit any authority via the staff UI making a single subfield change. Open Tools -> Log viewer for that authority and verify the diff column lists only the changed subfield (plus the 005 timestamp), with no rows for ind1/ind2 of untouched fields. 3. Re-run the same edit a second time changing nothing else; the diff should again be limited to 005 + the touched subfield. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29016 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29016 [Bug 29016] Log viewer has problems with many entries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #28 from Lisette Scheer <lisette@bywatersolutions.com> --- Thanks for these fixes. Works great and no more empties showing for me on modify. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198301|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=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198302|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=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198303|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=42032 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198304|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=42032 --- Comment #29 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 198417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198417&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 Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #30 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 198418 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198418&action=edit Bug 42032: (follow-up) Write state JSON to AUTHORITIES info column Mirrors bug 42188's biblio info-column convention. Generalise the CATALOGUING-only info-column rewrite branch in C4::Log::logaction to cover AUTHORITIES as well, using a module-aware prefix map so each module gets its own prefix ("biblio" / "authority"). For AUTHORITIES this means MODIFY now stores "authority {pre-change JSON}" and DELETE stores "authority {final-state JSON}", while ADD stays bare "authority" (the call site passes the string directly and ADD is guarded anyway). The biblio behaviour is preserved bit-for-bit. Test plan: 1. prove t/db_dependent/AuthoritiesMarc.t 2. Enable AuthoritiesLog. Create / modify / delete an authority via the staff UI, then check action_logs: - ADD row's info column reads just "authority" - MODIFY row's info column reads "authority { ... pre-change JSON ... }" - DELETE row's info column reads "authority { ... final-state JSON ... }" 3. prove t/db_dependent/Koha/Biblio.t 4. prove t/db_dependent/Log.t Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #31 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 198419 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198419&action=edit Bug 42032: (follow-up) Pretty-render authority info column in log viewer Mirrors bug 42188's biblio log-viewer rendering. Generalise the biblio-only renderCatalogInfo() helper in viewlog.js to also match the "authority <JSON>" prefix introduced by the previous follow-up, and rename it to renderRecordInfo() to reflect its wider scope. The existing fmtJsonValue() helper already handles MiJ's nested arrays of subfield objects, so no rendering changes are needed beyond the regex and name. Test plan: 1. Enable AuthoritiesLog. 2. Create, edit, and delete an authority via the staff UI. 3. Go to Tools -> Log viewer, filter by module=Authorities. 4. Verify: - ADD row's info cell shows just "authority". - MODIFY and DELETE rows' info cells render as a nested list (auth_header columns plus _marc leader + fields array). - Diff column still renders the before/after struct-diff table. 5. Re-check a biblio (CataloguingLog) entry: still renders as before. 6. Re-check a MEMBERS entry: untouched. Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #32 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 198420 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198420&action=edit Bug 42032: (follow-up) Eliminate phantom indicator diffs on authority MODIFY Authority MODIFY action log diffs were emitting bogus entries for every field with a default ' ' indicator on every save, producing output like: _marc.fields.1.040.ind1 ' ' ' ' _marc.fields.1.040.ind2 ' ' ' ' _marc.fields.2.150.ind1 ' ' ' ' _marc.fields.3.667.ind1 ' ' ' ' ... even when only a single subfield was edited. Root cause: Struct::Diff treats a utf8-flagged ' ' as different from a non-utf8 ' ' SV, even though Perl's eq returns true. ModAuthority was sourcing the two sides of the diff from different parse paths: - $oldrecord = GetAuthority($authid) -> MARC::Record->new_from_xml(...) -> indicators arrive utf8-flagged - $record (the "after" side) was the in-memory MARC built by the editor from CGI parameters -> indicators are bare byte strings The XML round-trip through AddAuthority normalises the stored copy, but the in-memory $record we passed to logaction had not been re-parsed, so every default indicator looked like a change to Struct::Diff. Fix: after AddAuthority commits the new state, re-read it via $new_authority->record and pass that to _authority_log_data. Both sides of the diff now traverse the same new_from_xml path, utf8 flags match, and Struct::Diff falls silent on unchanged indicators. This is the symmetric counterpart of how biblios already work in C4::Biblio: ModBiblio sources both $original_marc and $updated_marc_log through Koha::Biblio::Metadata::record_strip_nonxml (which also calls new_from_xml), so biblios don't hit this. The deeper asymmetry between in-memory editor MARC and stored MARC (default indicators only get normalised on the XML round-trip) is left for a separate bug; this patch keeps the action log diff clean without touching the storage path. Test plan: 1. prove t/db_dependent/AuthoritiesMarc.t 2. Enable AuthoritiesLog. Edit any authority via the staff UI making a single subfield change. Open Tools -> Log viewer for that authority and verify the diff column lists only the changed subfield (plus the 005 timestamp), with no rows for ind1/ind2 of untouched fields. 3. Re-run the same edit a second time changing nothing else; the diff should again be limited to 005 + the touched subfield. Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 --- Comment #33 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42032 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #34 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org