From b98b62231ac4b9ccc14c0d159a8d1ef46e785127 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 9 Mar 2026 21:46:09 +0000 Subject: [PATCH] Bug 40135: Fix info column prefix for biblio MODIFY logs The MODIFY path in logaction received the updated biblio as a plain hashref (not a Koha::Object), so the info column was populated with raw Dumper output instead of the expected "biblio ..." prefix. This broke two things: the 'Modification Log' link from the bib record sidebar (which filters on info LIKE 'biblio%'), and the Object column in the log viewer (which detects biblio entries via info.substr(0,6)). Following the same pattern as the Koha::Item MODIFY special case, add a parallel branch for CATALOGUING MODIFY with a hashref \$infos that sets the info column to "biblio " . Dumper(\$original). This restores backward-compatible detection while keeping the diff column correctly populated from the before/after hashrefs (including _marc changes). --- C4/Log.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Log.pm b/C4/Log.pm index 24c9b949311..59ef3a4f4c6 100644 --- a/C4/Log.pm +++ b/C4/Log.pm @@ -96,7 +96,11 @@ sub logaction { $updated = $infos; if ( ref $infos eq 'HASH' ) { local $Data::Dumper::Sortkeys = 1; - $infos = Dumper($updated); + if ( $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) { + $infos = "biblio " . Dumper( ref $original eq 'HASH' ? $original : {} ); + } else { + $infos = Dumper($updated); + } } } -- 2.53.0