Bugzilla – Attachment 148774 Details for
Bug 33284
checkout_renewals table retains checkout history in violation of patron privacy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33284: Set renewer_id for sets of checkouts
Bug-33284-Set-renewerid-for-sets-of-checkouts.patch (text/plain), 1.11 KB, created by
Andrew Fuerste-Henry
on 2023-03-27 13:39:57 UTC
(
hide
)
Description:
Bug 33284: Set renewer_id for sets of checkouts
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2023-03-27 13:39:57 UTC
Size:
1.11 KB
patch
obsolete
>From d2e7541b1a45482b0af4a3debfbb85a8ceefece7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 24 Mar 2023 16:07:47 +0000 >Subject: [PATCH] Bug 33284: Set renewer_id for sets of checkouts > >This patch adds a trigger into the anonymize function of >Koha::Old::Checkouts such that we pass along the anonymize action to >the renewals record. > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > Koha/Old/Checkouts.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/Koha/Old/Checkouts.pm b/Koha/Old/Checkouts.pm >index 8ee651645f..b94df1ef22 100644 >--- a/Koha/Old/Checkouts.pm >+++ b/Koha/Old/Checkouts.pm >@@ -101,6 +101,11 @@ sub anonymize { > Koha::Exceptions::SysPref::NotSet->throw( syspref => 'AnonymousPatron' ) > unless $anonymous_id; > >+ while ( my $checkout = $self->next ) { >+ my $self_renewals = $checkout->renewals->search( { renewer_id => $checkout->borrowernumber } ); >+ $self_renewals->update( { renewer_id => $anonymous_id } ); >+ } >+ > return $self->update( { borrowernumber => $anonymous_id }, { no_triggers => 1 } ); > } > >-- >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 33284
:
148469
|
148486
|
148487
|
148670
|
148671
|
148672
|
148772
|
148773
|
148774
|
168596
|
168597
|
168598
|
168599