Bugzilla – Attachment 75367 Details for
Bug 20724
ReservesNeedReturns syspref breaks "Holds awaiting pickup"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20724: (QA follow-up) Add a simple db revision
Bug-20724-QA-follow-up-Add-a-simple-db-revision.patch (text/plain), 1.50 KB, created by
Marcel de Rooy
on 2018-05-16 13:45:56 UTC
(
hide
)
Description:
Bug 20724: (QA follow-up) Add a simple db revision
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-05-16 13:45:56 UTC
Size:
1.50 KB
patch
obsolete
>From 9cf315bd3d10e92d199fcdea56b4f36b5c970ca5 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 16 May 2018 15:39:04 +0200 >Subject: [PATCH] Bug 20724: (QA follow-up) Add a simple db revision >Content-Type: text/plain; charset=utf-8 > >We should correct bad data too. >This is a trivial, pragmatic approach. Instead of doing a complex >calculation with holidays etc. (as was done on 12063), we just add >MaxPickupDelay or 7 days to today probably resulting in a little bonus >time. Only for waiting holds. When the ReservesNeedReturns pref was not >Automatic, there should be no changes. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_20724.perl | 8 ++++++++ > 1 file changed, 8 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_20724.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_20724.perl b/installer/data/mysql/atomicupdate/bug_20724.perl >new file mode 100644 >index 0000000..ffdb1dc >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_20724.perl >@@ -0,0 +1,8 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ my $sql = q|UPDATE reserves SET expirationdate = DATE_ADD( NOW(), INTERVAL ? DAY) WHERE expirationdate IS NULL AND waitingdate IS NOT NULL|; >+ $dbh->do( $sql, undef, C4::Context->preference('MaxPickupDelay') || 7 ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 20724 - expirationdate filled for waiting holds)\n"; >+} >-- >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 20724
:
75211
|
75219
|
75221
|
75222
|
75223
|
75307
|
75308
|
75309
|
75325
|
75363
|
75364
|
75365
|
75366
|
75367