Koha-clms/misc/maintenance
Nick Clemens 342c1d5993
Bug 39301: pseudonymize_statistics.pl script generates too many background jobs
This patch changes the script to use 'Koha::PseudonymizedTransaction->new_from_statistic' directly
rather than calling 'Koha::Statistic->pseudonymize()' which generates a background job.

Additionally, some of the checks from 'pseudonymnize' and the background job are moved into the search
so we don't fetch any to pseudonymize that should not be.

To test:
 1 - Generate some entries in statistics (checkin, checkout, renew, etc)
 2 - Enable pseudonymization (see bug 28911 if you need bcrypt settings)
 3 - perl misc/maintenance/pseudonymize_statistics.pl -v -c
 4 - Statistics pseudonymized
 5 - Check the background jobs table, note jobs were generated
 6 - Apply patch
 7 - perl misc/maintenance/pseudonymize_statistics.pl -v -c
 8 - You get same count as before, and are warned of existing pseudonymized transactions
 9 - enter 'Y' to continue
10 - Check the pseudonymized_transacations table
11 - Confirm same rows were generated twice
12 - Check the background jobs
13 - Confirm there were no new jobs generated (for pseudonymization)

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-22 08:46:35 +02: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 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
acq_cancel_obsolete_orders.pl Bug 36068: (QA follow-up) Add OPTIONS section in POD 2024-04-19 18:06:31 +02: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 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
borrowers-force-messaging-defaults.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
check_syspref_cache.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
check_sysprefs.sh Bug 8353 follow-up adding a tiny sh in misc/maintenance 2012-07-13 14:42:55 +02:00
cmp_sysprefs.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
compare_es_to_db.pl Bug 36365: (follow-up) Indexing should be done async and in chunks 2025-04-14 08:51:17 +02:00
dedup_authorities.pl Bug 13706: Minor tidy/spelling issues 2024-04-26 14:14:54 +02:00
fix_accountlines_date.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
fix_accountlines_rmdupfines_bug8253.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
fix_invalid_dates.pl Bug 38857: Update cronjobs to log run before processing parameters 2025-01-10 19:19:23 +01:00
fix_mysql_constraints.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
fix_tags_weight.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
generate_MARC21Languages.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
make_zebra_dom_cfg_from_record_abs Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +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 39301: pseudonymize_statistics.pl script generates too many background jobs 2025-04-22 08:46:35 +02:00
remove_items_from_biblioitems.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sanitize_records.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
search_for_data_inconsistencies.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sync_db_comments.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
touch_all_biblios.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
touch_all_items.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
update_authorities.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
update_localuse_from_statistics.pl Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script 2024-11-18 17:04:32 +01:00