https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41358
--- Comment #5 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 190627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190627&action=edit Bug 41358: Apply consistent JSON logging to holds (Bug 40866) This patch extends the bug fix to also cover HOLDS CREATE logs, which had the same inconsistent logging pattern introduced in Bug 40866. Similar to CIRCULATION ISSUE logs, HOLDS CREATE logs would store just the hold ID when there were no confirmations or forced overrides, but would store a full JSON structure when overrides were present. This makes reporting difficult as queries need to handle both formats. Changes: C4/Reserves.pm: - Updated AddReserve to always store logs in JSON format - Removed conditional logic - now always creates consistent JSON with confirmations and forced defaulting to empty arrays t/db_dependent/Reserves.t: - Updated "Bug 40866: AddReserve override JSON logging" test - Changed test plan from 8 to 11 tests - Now expects JSON format even for normal holds without overrides - Fixed variable redeclaration warning misc/maintenance/migrate_action_logs_to_json.pl: - Renamed from migrate_circulation_logs_to_json.pl - Extended to handle both CIRCULATION ISSUE and HOLDS CREATE logs - Processes both log types in batches - Shows separate and combined statistics - Added Koha::Holds and Koha::Old::Holds imports - For HOLDS logs, attempts to recover branchcode, biblionumber, and itemnumber from old_reserves/reserves tables This ensures both circulation and holds logs use consistent JSON format for easier reporting and analysis. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
