Koha-clms/misc/maintenance
Martin Renvoize c64aea8fcc
Bug 41358: Add migration script for legacy circulation logs
This patch adds an out-of-band migration script to convert legacy
CIRCULATION ISSUE action logs from the old itemnumber-only format
to the new consistent JSON format.

The script:
- Finds all CIRCULATION ISSUE logs where info is just an itemnumber
- Converts them to JSON format with the standard structure
- Attempts to recover issue_id and branchcode from old_issues/issues
- Runs in dry-run mode by default (--commit flag to actually update)
- Processes in batches to handle large databases safely
- Includes verbose mode for detailed output

Usage:
  perl misc/maintenance/migrate_action_logs_to_json.pl --help
  perl misc/maintenance/migrate_action_logs_to_json.pl --verbose
  perl misc/maintenance/migrate_action_logs_to_json.pl --commit

This is designed as an out-of-band maintenance script rather than
an atomic update because:
1. May be expensive on large databases with many log entries
2. Migration is optional - display code handles both formats
3. Can be run during off-peak hours at admin's discretion

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-16 10:54:20 +00:00
..
UNIMARC_fix_collectiontitle.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
UNIMARC_sync_date_created_with_marc_biblio.pl Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
acq_cancel_obsolete_orders.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
audit_database.pl Bug 36039: (QA follow-up): Improve audit messages 2024-12-27 15:19:05 +01:00
auth_show_hidden_data.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
borrowers-force-messaging-defaults.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
check_syspref_cache.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
check_sysprefs.sh
…
cmp_sysprefs.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
compare_es_to_db.pl Bug 39636: Update curl link 2025-10-14 14:52:00 -06:00
dedup_authorities.pl Bug 41097: (QA follow-up) Clarify POD 2026-02-25 07:37:04 -07:00
fix_accountlines_date.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
fix_accountlines_rmdupfines_bug8253.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
fix_invalid_dates.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
fix_mysql_constraints.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
fix_tags_weight.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
generate_MARC21Languages.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
make_zebra_dom_cfg_from_record_abs Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
migrate_action_logs_to_json.pl Bug 41358: Add migration script for legacy circulation logs 2026-07-16 10:54:20 +00:00
process_record_through_filter.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
pseudonymize_statistics.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
remove_items_from_biblioitems.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
sanitize_records.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
search_for_data_inconsistencies.pl Bug 42640: Script search_for_data_inconsistencies.pl use binmode UTF-8 2026-06-23 16:26:38 +00:00
sync_db_comments.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
touch_all_biblios.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
touch_all_items.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
update_authorities.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
update_localuse_from_statistics.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00