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

Marcel de Rooy <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #179177|0                           |1
        is obsolete|                            |

--- Comment #4 from Marcel de Rooy <[email protected]> ---
Created attachment 181155
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181155&action=edit
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 <[email protected]>

Signed-off-by: Marcel de Rooy <[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/

Reply via email to