https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41358 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198291 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198291&action=edit Bug 41358: Apply consistent JSON logging to holds (Bug 40866) Bug 40866 introduced JSON logging for HOLDS CREATE but stored null for 'confirmations' and 'forced' when no overrides were present. This patch mirrors the earlier change to CIRCULATION ISSUE by defaulting them to empty arrays, keeping the two log streams structurally identical and simplifying reporting queries. Changes: C4/Reserves.pm: - Default confirmations/forced to [] in the AddReserve log payload. t/db_dependent/Reserves.t: - Update the Bug 40866 subtest to assert the empty-array defaults on normal holds, and fix a 'my $log_data' redeclaration. tools/viewlog.pl: - Extend the JSON-decode block to also cover HOLDS logs so the viewlog.tt HOLDS branch (ELSIF loopro.json_found) actually fires. Previously json_found was set only for CIRCULATION, so HOLDS rendered the raw pretty-printed JSON blob. misc/maintenance/migrate_action_logs_to_json.pl: - Renamed from migrate_circulation_logs_to_json.pl. - Extended to handle legacy pre-Bug 40866 HOLDS CREATE logs where info is a bare hold_id, recovering branchcode / biblionumber / itemnumber from old_reserves / reserves. - Uses the same keyset-pagination pattern as the circulation loop so rows are not skipped under --commit. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.