]> git.koha-community.org Git - koha.git/commit
Bug 26604: "Generate next" button gives error on serials-collection.pl
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 2 Oct 2020 16:11:48 +0000 (12:11 -0400)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 17 Nov 2020 09:28:41 +0000 (10:28 +0100)
commite49596dbca7ed54dcb8f107bead6899a300b65b7
tree3252f3d4c2c0a015622800d6eabab33cfa6940aa
parentf9dbb4b1e97d5456ba742bcee3284c33b0fdc501
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>
(cherry picked from commit 9f4b54a6d74b9635195bb9ea0b9c11fe5570cf6e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c527522ec02c4b07c57c5a211d846856c936018)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 35cafa56f424a81ae98113d4f1db376987787849)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
serials/serials-collection.pl