Bugzilla – Attachment 129452 Details for
Bug 29483
AllowRenewalIfOtherItemsAvailable has poor performance for records with many items
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.66 KB, created by
Andrew Fuerste-Henry
on 2022-01-13 20:58:13 UTC
(
hide
)
Description:
Bug 29843: Use in batch_anonymise.pl
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2022-01-13 20:58:13 UTC
Size:
1.66 KB
patch
obsolete
>From 14bfb206869ff08ed36c7201f6d0ecfb8381efee 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 > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >https://bugs.koha-community.org/show_bug.cgi?id=29483 >--- > 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.30.2
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 29483
:
127656
|
127819
|
127820
|
127883
|
127884
|
127885
|
129450
|
129451
|
129452
|
129453
|
129454
|
129499
|
129500
|
129501
|
132094
|
132095
|
132096
|
132113
|
133389
|
133390
|
133391
|
134723