Bugzilla – Attachment 129271 Details for
Bug 29843
Add ->anonymize and ->filter_by_anonymizable to Koha::Old::Checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29843: Use in batch_anonymise.pl
Bug-29843-Use-in-batchanonymisepl.patch (text/plain), 1.54 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-10 14:33:50 UTC
(
hide
)
Description:
Bug 29843: Use in batch_anonymise.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-10 14:33:50 UTC
Size:
1.54 KB
patch
obsolete
>From 76fc6f2c6322932701f87544ef0a87c0c19d6af6 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 10 Jan 2022 11:32:15 -0300 >Subject: [PATCH] Bug 29843: Use in batch_anonymise.pl > >This patch makes the batch_anonymise.pl cronjob script use the newly >introduced methods instead of the old ones. > >To test: >1. Try the tool >=> SUCCESS: No behavior change >2. Sign off :-D >--- > misc/cronjobs/batch_anonymise.pl | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/batch_anonymise.pl b/misc/cronjobs/batch_anonymise.pl >index 5383578ef1..025e151309 100755 >--- a/misc/cronjobs/batch_anonymise.pl >+++ b/misc/cronjobs/batch_anonymise.pl >@@ -25,8 +25,8 @@ use C4::Context; > use C4::Log qw( cronlogaction ); > > use Koha::Database; >+use Koha::Old::Checkouts; > use Koha::Old::Holds; >-use Koha::Patrons; > > use Date::Calc qw( Add_Delta_Days Today ); > use Getopt::Long qw( GetOptions ); >@@ -67,7 +67,11 @@ my ($newyear,$newmonth,$newday) = Add_Delta_Days ($year,$month,$day,(-1)*$days); > my $formatdate = sprintf "%4d-%02d-%02d",$newyear,$newmonth,$newday; > $verbose and print "Checkouts and holds before $formatdate will be anonymised.\n"; > >-my $rows = Koha::Patrons->search_patrons_to_anonymise( { before => $formatdate } )->anonymise_issue_history( { before => $formatdate } ); >+my $rows = Koha::Old::Checkouts >+ ->filter_by_anonymizable >+ ->filter_by_last_update( { days => $days } ) >+ ->anonymize; >+ > $verbose and print int($rows) . " checkouts anonymised.\n"; > > $rows = Koha::Old::Holds >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29843
:
129269
|
129270
|
129271
|
129272
|
129274
|
129275
|
129276
|
129277
|
129278
|
129438
|
129439
|
129440
|
129441
|
129442
|
129445
|
129446
|
129447
|
129448
|
129449
|
129475
|
129476
|
129477
|
129478
|
129479
|
129492
|
129493
|
129494
|
129495
|
129496
|
130264
|
130265
|
130266
|
130267
|
130268
|
130335