Bugzilla – Attachment 125891 Details for
Bug 29192
DefaultHoldExpirationDate sends a DateTime object to logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29192: Set expirationdate as string when storing Hold
Bug-29192-Set-expirationdate-as-string-when-storin.patch (text/plain), 1.42 KB, created by
Andrew Fuerste-Henry
on 2021-10-07 14:53:35 UTC
(
hide
)
Description:
Bug 29192: Set expirationdate as string when storing Hold
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-10-07 14:53:35 UTC
Size:
1.42 KB
patch
obsolete
>From 8b67fa82627cc4ce602fa7e2f79ce1e96638e480 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 7 Oct 2021 14:31:10 +0000 >Subject: [PATCH] Bug 29192: Set expirationdate as string when storing Hold > >To test: > 1 - Enable HoldsLog in system preferences > 2 - Set system preferences: > DefaultHoldExpirationDate: Set > DefaultHoldExpirationdatePeriod: 5 > DefaultHoldExpirationdateUnitOfTime: days > 3 - Create a hold for a patron > 4 - Note the expiration date is set > 5 - Check the action logs - SELECT * FROM action_logs > 6 - Note that there is a lot of data, this is from DateTime object in expirationdate > 7 - Apply patch > 8 - Restart all > 9 - Place another hold >10 - Confirm expiration date set correctly >11 - View the logs >12 - Entry for new hold contains only the date, no extra data > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > Koha/Hold.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 26c41d7924..54a5aba5a1 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -624,7 +624,7 @@ sub _set_default_expirationdate { > C4::Context->preference('DefaultHoldExpirationdateUnitOfTime') || 'days'; > > $self->expirationdate( >- dt_from_string( $self->reservedate )->add( $timeunit => $period ) ); >+ dt_from_string( $self->reservedate )->add( $timeunit => $period )->strftime("%Y-%m-%d") ); > } > > =head3 _move_to_old >-- >2.20.1
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 29192
:
125889
|
125891
|
125898
|
125966