https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40135

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 194785
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194785&action=edit
Bug 40135: Populate diff column for biblio ADD/MODIFY/DELETE logs

Previously the CATALOGUING action log entries for biblio operations
stored minimal data: ADD and DELETE logged just the string "biblio",
while MODIFY logged a raw MARC-formatted dump of the pre-change record
as a plain text string. None of these populated the diff column.

This follow-up updates AddBiblio, ModBiblio and DelBiblio in C4/Biblio.pm
to follow the same pattern as Koha::Item::store, passing the Koha::Biblio
object and an original unblessed hashref to logaction so that the diff
column is automatically populated with Struct::Diff JSON reflecting the
changes to the biblio table columns (title, author, frameworkcode, etc.).

For ADD, logaction diffs an empty hashref against the new biblio state,
producing added-field entries for all columns. For DELETE, it diffs the
pre-deletion state against an empty hashref, producing removed-field
entries. For MODIFY, the before-state is captured prior to the update and
the after-state is read back once ModBiblioMarc and _koha_modify_biblio
have completed, so the diff reflects the actual committed changes.

The test for ModBiblio on an invalid MARC record is updated to reflect
that the MARC decoding error is no longer logged in the info column;
the biblio table data is now logged instead.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
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/

Reply via email to