Bug 37540 - Pseudonymization is preventing renewals from the patrons account page
Summary: Pseudonymization is preventing renewals from the patrons account page
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical
Assignee: Nick Clemens (kidclamp)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks: 37558
  Show dependency treegraph
 
Reported: 2024-07-31 17:00 UTC by Nick Clemens (kidclamp)
Modified: 2024-11-18 18:40 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
Bug 37540: Ensure datetime is a string before enqueueing pseudonymization (1.44 KB, patch)
2024-07-31 17:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37540: Ensure datetime is a string before enqueueing pseudonymization (1.50 KB, patch)
2024-07-31 18:54 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 37540: Ensure datetime is a string before enqueueing pseudonymization (1.56 KB, patch)
2024-08-01 10:51 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-07-31 17:00:52 UTC
To recreate:
1 - Enable Pseudonymization in system preferences
    NOTE: See bug 28911 to setup bcrypt value in koha conf
2 - Checkout an item to a patron
3 - From the checkouts page, check the box for the checkout under renewals
4 - Click the 'Renew selected items' button
5 - Internal server error:

==> /var/log/koha/kohadev/plack-error.log <==
{UNKNOWN}: encountered object '2024-07-31T16:56:36', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /kohadevbox/koha/Koha/BackgroundJob.pm line 108. at /kohadevbox/koha/C4/Circulation.pm line 3411
Comment 1 Nick Clemens (kidclamp) 2024-07-31 17:26:55 UTC
Created attachment 169907 [details] [review]
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!
Comment 2 Nick Clemens (kidclamp) 2024-07-31 18:54:11 UTC
Libraries report this is actually blocking all circulations
Comment 3 Roman Dolny 2024-07-31 18:54:38 UTC
Created attachment 169911 [details] [review]
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>
Comment 4 Martin Renvoize (ashimema) 2024-08-01 10:51:33 UTC
Created attachment 169931 [details] [review]
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Katrin Fischer 2024-08-01 15:46:34 UTC
Happy to push as is, but should we have a bug for adding a primary key to statistics?
Comment 6 Katrin Fischer 2024-08-01 16:27:46 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 7 Nick Clemens (kidclamp) 2024-08-01 22:04:49 UTC
(In reply to Katrin Fischer from comment #5)
> Happy to push as is, but should we have a bug for adding a primary key to
> statistics?

I didn't consider it largely because of the cost of the update for systems with lots of statistics, but it might be worth filing for discussion
Comment 8 Katrin Fischer 2024-08-02 09:44:44 UTC
(In reply to Nick Clemens (kidclamp) from comment #7)
> (In reply to Katrin Fischer from comment #5)
> > Happy to push as is, but should we have a bug for adding a primary key to
> > statistics?
> 
> I didn't consider it largely because of the cost of the update for systems
> with lots of statistics, but it might be worth filing for discussion

Yes, I think let's discuss it at least. I believe it probably also makes other things harder.
Comment 9 Lucas Gass (lukeg) 2024-11-18 18:40:51 UTC
Backported to 24.05.x for upcoming 24.05.06