https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41358
--- Comment #29 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 201581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201581&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 CSV export JSON-decode block to also cover HOLDS logs, guarding the item lookup on itemnumber being present (HOLDS payloads may lack one) and filling the CSV item columns from the decoded payload. The legacy bare-itemnumber fallback is restricted to CIRCULATION so a legacy HOLDS hold_id is not mistaken for an itemnumber. koha-tmpl/intranet-tmpl/prog/js/viewlog.js: - Extend the info column override rendering (renderCircInfo) to HOLDS entries so forced/confirmations arrays display translated, exactly as they do for CIRCULATION. The log viewer moved to an ajax datatable in bug 29016, so this replaces the earlier json_found change to viewlog.pl/viewlog.tt. misc/maintenance/migrate_action_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 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ 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/
