Bugzilla – Attachment 145003 Details for
Bug 32563
Reservedate becomes expirationdate in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32563: HOTFIX: reservedate becomes expirationdate in some cases
Bug-32563-HOTFIX-reservedate-becomes-expirationdat.patch (text/plain), 1.54 KB, created by
Slava Shishkin
on 2023-01-04 12:19:18 UTC
(
hide
)
Description:
Bug 32563: HOTFIX: reservedate becomes expirationdate in some cases
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2023-01-04 12:19:18 UTC
Size:
1.54 KB
patch
obsolete
>From 46aafdada17565f6a0a76d71058d594dd5dc9d1d Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Wed, 14 Dec 2022 17:03:58 +0200 >Subject: [PATCH] Bug 32563: HOTFIX: reservedate becomes expirationdate in some > cases > >To reproduce: >1. Go to /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=DefaultHoldExpirationdate >2. Setup default expiration date to be 1 year from reserve date for example. >3. Switch to catalog to any biblio with item for example /cgi-bin/koha/catalogue/detail.pl?biblionumber=1 and place a hold for any borrower. >4. Check holds for this item, as by example /cgi-bin/koha/reserve/request.pl?biblionumber=1 >5. Observe the field "Date" contains the same date as the "Expiration" which is wrong and both contains date 1 year in the future. "Date" should have a date the reservation made, i.e. now. >6. Apply the patch. >7. Make another hold, i.e. repeat steps 3-5 >8. Observe the field "Date" contains correct date (today) but the "Expiration" date is 1 year in the future as set is step 2. >--- > Koha/Hold.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index a5a9d03003..8e314d25b9 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -896,7 +896,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->clone )->add( $timeunit => $period ) ); > } > > =head3 _move_to_old >-- >2.38.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 32563
:
145003
|
145573
|
149857