Bug 42031

Summary: Add diff support to serial subscription 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:36:32 UTC
The action logging in C4/Serials.pm for subscription changes passes an empty string as the info parameter for all logged actions (MODIFY, ADD, RENEW, DELETE). No structured diff is generated in the action_logs.diff column.

Affected calls in C4/Serials.pm:
- SERIAL/MODIFY (~line 1410): logaction( "SERIAL", "MODIFY", $subscriptionid, "" )
- SERIAL/ADD    (~line 1534): logaction( "SERIAL", "ADD",    $subscriptionid, "" )
- SERIAL/RENEW  (~line 1636): logaction( "SERIAL", "RENEW",  $subscriptionid, "" )
- SERIAL/DELETE (~line 1859): logaction( "SERIAL", "DELETE", $subscriptionid, "" )

This bug covers updating these calls to pass meaningful subscription data. Ideally the C4::Serials functions should be refactored to use Koha::Subscription objects so that $subscription->unblessed can be passed as $infos and $original. At a minimum, a subscription hashref retrieved before the change should be passed as $original and the post-change state as $infos.