Bug 26452 - overdue_notices causes "uninitialized value in string"
Summary: overdue_notices causes "uninitialized value in string"
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: 20.05
Hardware: PC Linux
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 08:52 UTC by Matthew Wyneken
Modified: 2021-06-14 21:28 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Wyneken 2020-09-14 08:52:41 UTC
I just updated my Koha from 17.05 to 20.05 when I upgraded the server from Debian Stretch to Debian Buster. 

Now when I execute:

   koha-foreach --chdir --enabled --email /usr/share/koha/bin/cronjobs/overdue_notices.pl -t

I get the following error/warning:

   Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm line 663.

Can anybody tell me what this means? Is it a big problem?
Comment 1 Katrin Fischer 2020-09-20 22:53:19 UTC
Can you give your exact Koha version for the line numbers? (20.05.xx) 

It's more likely to be a warn than a big issue.
Comment 2 Matthew Wyneken 2020-09-21 07:06:24 UTC
Thank you for responding!

The version is 20.05.03.000.

If it's just a warning is it maybe just complaining about a single account? Is there any way to find out which account it is and what exactly it's complaining about?
Comment 3 Katrin Fischer 2020-10-19 21:59:10 UTC
It looks like this is the line in your version:

http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=C4/Overdues.pm;h=a9de67d1ee559114524c69e0441b6b2e350cceea;hb=d3ad3a6c884e426c92c3628d3ab0638299e2075b#l663

Maybe it could help to run this SQL statement and see what it returns:

 658         SELECT DISTINCT(branchcode)
 659         FROM overduerules
 660         WHERE delay1 IS NOT NULL
 661         ORDER BY branchcode
Comment 4 Matthew Wyneken 2020-10-26 10:40:21 UTC
Thanks for the response, Katrin!

I really don't know much about mysql so I hope I did this correctly. I created a script file test.sql:

USE koha_libschil
SELECT DISTINCT(branchcode)
FROM overduerules
WHERE delay1 IS NOT NULL
ORDER BY branchcode

Then I executed it like this but there was no output at all:

# mysql --user=root -p <test.sql
Enter password:

Does that provide any useful information?
Comment 5 Katrin Fischer 2020-10-26 10:47:45 UTC
Sorry, not really. What you can do is:

- In Koha: Reports > New from SQL > Paste the command there, save and run
- Check your configuration under Tools > Ovrdue notice triggers makes sense and looks complete
Comment 6 Matthew Wyneken 2020-10-26 11:17:03 UTC
I created a new report and ran it. The results:

MyReportName
Rows per page: <20>
branchcode

So again, nothing.

Under "Overdue notice/status triggers" I have three tabs: First, Second, Third. Each of them has two lines: Adult, Student. Everything is blank, though.

This Koha instance is for the library of a university department. It's basically only used to keep track of the books. It's not even used to check books out so there isn't much of anything configured. There are five users, mostly for administrative purposes.
Comment 7 Katrin Fischer 2020-10-26 11:42:26 UTC
Ah ok, maybe it would be easiest to just deactivate that cronjob then? I think it complains about missing configuration - but it makes not sense to set it up if not used.
Comment 8 Matthew Wyneken 2020-10-26 13:01:06 UTC
That is a simple and elegant solution to the problem! It's a good thing I gave you the background. Thanks!
Comment 9 Matthew Wyneken 2020-10-26 13:07:27 UTC
I just commented out the line in /etc/cron.daily/koha-common. Or is the way to do that using the web site?