Bugzilla – Attachment 69189 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: (QA follow-up) Small optimization
Bug-19626-QA-follow-up-Small-optimization.patch (text/plain), 1.64 KB, created by
Marcel de Rooy
on 2017-11-17 08:29:29 UTC
(
hide
)
Description:
Bug 19626: (QA follow-up) Small optimization
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-11-17 08:29:29 UTC
Size:
1.64 KB
patch
obsolete
>From b25dd43aa806cd5425a647d5011292d60fdbafb6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 17 Nov 2017 09:23:40 +0100 >Subject: [PATCH] Bug 19626: (QA follow-up) Small optimization >Content-Type: text/plain; charset=utf-8 > >We are only using $calendar when the pref is set. >Date calculation can be moved in if-else structure. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/updatedatabase.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f12d8d0..bd60c08 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -14370,12 +14370,12 @@ if( CheckVersion( $DBversion ) ) { > $requested_expiration = dt_from_string($hold->expirationdate); > } > >- my $calendar = Koha::Calendar->new( branchcode => $hold->branchcode ); > 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($hold->waitingdate), $max_pickup_delay ); >+ my $calendar = Koha::Calendar->new( branchcode => $hold->branchcode ); >+ $expirationdate = $calendar->days_forward( $expirationdate, $max_pickup_delay ); >+ } else { >+ $expirationdate->add( days => $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