Bugzilla – Attachment 169911 Details for
Bug 37540
Pseudonymization is preventing renewals from the patrons account page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37540: Ensure datetime is a string before enqueueing pseudonymization
Bug-37540-Ensure-datetime-is-a-string-before-enque.patch (text/plain), 1.50 KB, created by
Roman Dolny
on 2024-07-31 18:54:38 UTC
(
hide
)
Description:
Bug 37540: Ensure datetime is a string before enqueueing pseudonymization
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-07-31 18:54:38 UTC
Size:
1.50 KB
patch
obsolete
>From b17c577d919eb8483787bb31af9006bdcb66bbc9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 31 Jul 2024 17:23:50 +0000 >Subject: [PATCH] Bug 37540: Ensure datetime is a string before enqueueing > pseudonymization > >To test: >1 - Enable Pseudonymization in system preferences > NOTE: See bug 28911 for bcrypt setup >2 - Issue an item to a patron >3 - View the patrons checkouts >4 - Check the box under 'Renew' >5 - Renew selected items >6 - Internal server error >7 - Apply patch >8 - Restart all >9 - Repeat 4&5 >10 - Success! > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > Koha/Statistic.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/Statistic.pm b/Koha/Statistic.pm >index 14f299569f..4e981c31c2 100644 >--- a/Koha/Statistic.pm >+++ b/Koha/Statistic.pm >@@ -150,7 +150,14 @@ sub pseudonymize { > my ($self) = @_; > > return unless ( $self->borrowernumber && grep { $_ eq $self->type } qw(renew issue return onsite_checkout) ); >- Koha::BackgroundJob::PseudonymizeStatistic->new->enqueue( { statistic => $self->unblessed } ); >+ >+ # FIXME When getting the object from svc/renewal we get a DateTime object >+ # normally we just fetch from DB to clear this, but statistics has no primary key >+ # so we just force it to string context >+ my $unblessed = $self->unblessed; >+ $unblessed->{datetime} = $unblessed->{datetime} . ""; >+ >+ Koha::BackgroundJob::PseudonymizeStatistic->new->enqueue( { statistic => $unblessed } ); > > } > >-- >2.39.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 37540
:
169907
|
169911
|
169931