Bugzilla – Attachment 69183 Details for
Bug 19626
Database update for bug 12063 incorrectly calculates expirationdate for holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19626 - Calculate expiration date for existing holds based on waitingdate
Bug-19626---Calculate-expiration-date-for-existing.patch (text/plain), 1.72 KB, created by
Nick Clemens (kidclamp)
on 2017-11-16 18:02:13 UTC
(
hide
)
Description:
Bug 19626 - Calculate expiration date for existing holds based on waitingdate
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-11-16 18:02:13 UTC
Size:
1.72 KB
patch
obsolete
>From 2905d69333ab932cc68328706b6592499f331861 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 15 Nov 2017 13:03:57 +0000 >Subject: [PATCH] Bug 19626 - Calculate expiration date for existing holds > based on waitingdate > >To test: >1 - Have/create a 16.11 instance with some waiting holds >2 - Those holds should not have an expirationdate >3 - Make sure some of the holds are waiting longer than >ReservesMaxPickupDelay >BACKUP THE DB >4 - Upgrade to 17.05 (or later) >5 - Check the expirationdate for the holds >6 - The date wil be in the future (curdate + delay) >7 - Restore DB >8 - Apply patch >9 - Run the upgrade again >10 - expirationdate should now be based on waitingdate >--- > installer/data/mysql/updatedatabase.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ec4eee4..f12d8d0 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -14371,11 +14371,11 @@ if( CheckVersion( $DBversion ) ) { > } > > my $calendar = Koha::Calendar->new( branchcode => $hold->branchcode ); >- my $expirationdate = dt_from_string(); >+ my $expirationdate = dt_from_string($hold->waitingdate); > $expirationdate->add(days => $max_pickup_delay); > > if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) { >- $expirationdate = $calendar->days_forward( dt_from_string(), $max_pickup_delay ); >+ $expirationdate = $calendar->days_forward( dt_from_string($hold->waitingdate), $max_pickup_delay ); > } > > my $cmp = $requested_expiration ? DateTime->compare($requested_expiration, $expirationdate) : 0; >-- >2.1.4
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 19626
:
69152
|
69183
|
69188
|
69189