Koha-clms/misc
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
..
admin Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
bin Bug 38382: Fresh connection when connexion CSRF token expires 2024-12-20 18:33:25 +01:00
cronjobs Bug 37920: Add cronjob loggging to writeoff_debts.pl 2025-03-17 08:21:24 +01:00
devel Bug 39353: (QA follow-up) Clarify error message 2025-03-19 17:34:54 +01:00
interface_customization
…
maintenance Bug 39301: pseudonymize_statistics.pl script generates too many background jobs 2025-04-22 08:46:35 +02:00
migration_tools Bug 39319: Fix POD for misc/migration_tools/koha-svc.pl 2025-04-14 08:51:20 +02:00
release_notes 24.11.00: Add missing manual contributors to release notes 2024-12-03 14:36:23 +01:00
search_tools Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
translator Bug 38871: Remove sub string_list from misc/translator/xgettext.pl 2025-02-19 17:05:36 +01:00
workers Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
add_date_fields_to_marc_records.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
add_statistics_borrowers_categorycode.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchCompareMARCvsFrameworks.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchDeleteUnusedSubfields.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchImportMARCWithBiblionumbers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchRebuildBiblioTables.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchRebuildItemsTables.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchRepairMissingBiblionumbers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchdeletebiblios.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
check_sysprefs.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
commit_file.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
export_borrowers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
export_records.pl Bug 36770: (QA follow-up) Tidy export_records.pl 2024-08-09 18:44:54 +02:00
import_patrons.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
koha-install-log
…
link_bibs_to_authorities.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
load_yaml.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mod_zebraqueue.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
process_ill_updates.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
recreateIssueStatistics.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sax_parser_print.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sax_parser_test.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sip_cli_emulator.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
stage_file.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
z3950_responder.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00