Bug 42037

Summary: Add diff support to ACQUISITIONS action logs
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Transaction logsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 37940    

Description Martin Renvoize (ashimema) 2026-03-09 15:37:20 UTC
The action logging for acquisitions events does not pass structured data or the $original parameter to logaction(), so no structured diff is generated in the action_logs.diff column.

Currently the only logged acquisitions action is:
- acqui/cancelorder.pl CANCEL_ORDER (~line 82):
  logaction( 'ACQUISITIONS', 'CANCEL_ORDER', $ordernumber );
  (no $infos or $original passed)

This bug covers a broader review of acquisitions logging to:
1. Update the CANCEL_ORDER log call to pass the order data (Koha::Acquisition::Order object or its unblessed hashref) as both $infos and $original so the log shows what was cancelled.
2. Identify and add logaction() calls for other significant acquisitions events (order creation, modification, receipt) that are currently unlogged or poorly logged, passing appropriate $infos and $original data to enable diff support.