[Koha-bugs] [Bug 34611] Add a script for pseudonymizing existing data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 18 17:13:41 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34611

--- Comment #31 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 163346
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163346&action=edit
Bug 34611: Add a script to pseudonymize statistics from before a given date

This script takes a date parameter in SQL format and pseudonymizes all
statistics
found before this date.

Only values that can be found will be added, i.e. no deleted patron or item
info
will be present.

Additionally - the values stored will be the current values from patrons and
items, so
some info will be approximate, much as it is when joining from the statistics
table for reporting.

To test:
 1 - Perform some issues/returns/renewals/on-site checkouts
 2 - Make sure Pseudonymization is disabled
 3 - perl misc/maintenance/pseudonymize_statistics.pl
 4 - Script ends and reports that preference is not active
 5 - Enable the pref, and choose some borrower and item fields
    NOTE: See bug 28911 if you need a bcrypt key for your koha-conf.xml
 6 - perl misc/maintenance/pseudonymize_statistics.pl
 7 - sudo koha-mysql kohadev
 8 - SELECT * FROM pseudonymized_transactions
 9 - Confirm data is correctly stored
10 - DELETE FROM pseudonymized_transactions;
11 - UPDATE statistics SET datetime = '2023-01-01 00:00:00';
12 - perl misc/maintenance/pseudonymize_statistics.pl -b "2022-12-31 23:59:59";
13 - SELECT * FROM pseudonymized_transactions;
14 - Confirm no entries were made
15 - Select different options in Pseudonmyization prefs, including borrower
attributes
     This wil require defining an attribute that can be kept for
pseudonymization
16 - Confirm options are correctly pseudonymized

Signed-off-by: AFHDubCoLib <andrewfh at dubcolib.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list