Bugzilla – Attachment 26940 Details for
Bug 11995
Followup for Bug 7688 - FIX GetNextDate in serialsUpdate.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 11995: Followup for Bug 7688 - FIX GetNextDate in serialsUpdate.pl
SIGNED-OFF-Bug-11995-Followup-for-Bug-7688---FIX-G.patch (text/plain), 2.43 KB, created by
Mark Tompsett
on 2014-04-10 03:52:45 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 11995: Followup for Bug 7688 - FIX GetNextDate in serialsUpdate.pl
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-04-10 03:52:45 UTC
Size:
2.43 KB
patch
obsolete
>From bd3e0686b71b1aa06be3eb78ae7a03da21d48081 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 24 Mar 2014 15:25:05 +0100 >Subject: [PATCH] [SIGNED OFF] Bug 11995: Followup for Bug 7688 - FIX > GetNextDate in serialsUpdate.pl > >Bug 7688 changes the prototype for GetNextDate. The serialsUpdate.pl >cronjob script has not been updated. > >Test plan: >Before applying the patch: >1/ Check that the following SQL query returns something: >SELECT serial.* >FROM serial >LEFT JOIN subscription ON (subscription.subscriptionid = serial.subscriptionid) >WHERE serial.status = 1 >AND DATE_ADD(planneddate, INTERVAL CAST(graceperiod AS SIGNED) DAY) < NOW() >AND subscription.closed = 0; >2/ Run misc/cronjobs/serialsUpdate.pl -v > It should die with an error message like this: > Can't use string ("2011-03-05") as a HASH ref while "strict refs" in use >3/ Apply the patch >4/ Run misc/cronjobs/serialsUpdate.pl -v > It should exit normally and print messages like this: > Serial issue with id=XX updated >5/ Run the Koha QA test tools. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >NOTE: The only file modified is misc/cronjobs/serialsUpdate.pl > The error is caused by switching the order of a hash and > parameter. This also corrects the date used to be > publisheddate instead of planneddate, because the latter > does not logically predict the next one. See comment #3. > The id=XX's listed in step 4 match the ids displayed by > the SQL query in step 1. >--- > misc/cronjobs/serialsUpdate.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/cronjobs/serialsUpdate.pl b/misc/cronjobs/serialsUpdate.pl >index 07d418a..813ef21 100755 >--- a/misc/cronjobs/serialsUpdate.pl >+++ b/misc/cronjobs/serialsUpdate.pl >@@ -110,10 +110,10 @@ $sth->execute(); > while ( my $issue = $sth->fetchrow_hashref ) { > > my $subscription = &GetSubscription( $issue->{subscriptionid} ); >- my $planneddate = $issue->{planneddate}; >+ my $publisheddate = $issue->{publisheddate}; > >- if ( $subscription && $planneddate && $planneddate ne "0000-00-00" ) { >- my $nextpublisheddate = GetNextDate( $planneddate, $subscription ); >+ if ( $subscription && $publisheddate && $publisheddate ne "0000-00-00" ) { >+ my $nextpublisheddate = GetNextDate( $subscription, $publisheddate ); > my $today = format_date_in_iso( C4::Dates->new()->output() ); > > if ( $nextpublisheddate && $today ) { >-- >1.7.9.5
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 11995
:
26559
|
26940
|
27008