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:
parent
f8f653f71e
commit
ef7dde45f7
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue