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).

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-03-09 21:46:09 +00:00
parent f8f653f71e
commit ef7dde45f7
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}
}
}