Bugzilla – Attachment 111399 Details for
Bug 26604
"Generate next" button gives error on serials-collection.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26604: "Generate next" button gives error on serials-collection.pl
Bug-26604-Generate-next-button-gives-error-on-seri.patch (text/plain), 2.87 KB, created by
Jonathan Druart
on 2020-10-09 13:25:30 UTC
(
hide
)
Description:
Bug 26604: "Generate next" button gives error on serials-collection.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-10-09 13:25:30 UTC
Size:
2.87 KB
patch
obsolete
>From 9f4b54a6d74b9635195bb9ea0b9c11fe5570cf6e Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 2 Oct 2020 12:11:48 -0400 >Subject: [PATCH] Bug 26604: "Generate next" button gives error on > serials-collection.pl > >In serials-collection.pl, the line > >$frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); > >causes the error > >Can't use string ("13") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/Serials.pm line 2198. > >This function call makes no sense, that subroutine always returns a list and doesn't take any parameters. I think it was meant to be GetSubscriptionFrequency which is in fact already called a few lines down. > >Signed-off-by: kelly mcelligott <kelly@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >JD > >Test plan: >1. Create a new subscription > * When there is an irregular issue: Skip issue number > * Select a frequency (not irregular) > * Test prediction pattern and mark some "not published" (to fill the subscription.irregular DB field >2. Receive a first serial (mark it arrived, an "expected" one is created) >3. Claim the expected one >=> You have 1 arrived and 1 claimed. >It's the only way to not have an expected one and hit the else block in serials/serials-collection.pl >4. Generate next => boom > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > serials/serials-collection.pl | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index c6b0f44901..e36e50e0f8 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -77,7 +77,7 @@ if($op eq 'gennext' && @subscriptionid){ > require C4::Serials::Numberpattern; > my $subscription = GetSubscription($subscriptionid); > my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscription->{numberpattern}); >- my $frequency = C4::Serials::Frequency::GetSubscriptionFrequencies($subscription->{periodicity}); >+ my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); > my $expected = GetNextExpected($subscriptionid); > my ( > $newserialseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, >@@ -85,7 +85,6 @@ if($op eq 'gennext' && @subscriptionid){ > ) = GetNextSeq($subscription, $pattern, $frequency, $expected->{publisheddate}); > > ## We generate the next publication date >- $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); > my $nextpublisheddate = GetNextDate($subscription, $expected->{publisheddate}, $frequency, 1); > my $planneddate = $date_received_today ? dt_from_string : $nextpublisheddate; > ## Creating the new issue >-- >2.20.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 26604
:
111167
|
111168
|
111171
|
111242
| 111399