Bug 13468 - overdue notice lists all checked out books
Summary: overdue notice lists all checked out books
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: 3.18
Hardware: PC Linux
: P5 - low major (vote)
Assignee: Martin Renvoize
QA Contact: Jonathan Druart
URL:
Whiteboard:
Keywords:
Depends on: 12529
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-15 21:13 UTC by Yuval Hager
Modified: 2016-06-21 21:37 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
BUG 13468: Overdue notice lists all checked out books (1.97 KB, patch)
2014-12-16 17:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
BUG 13468: Overdue notice lists all checked out books (2.02 KB, patch)
2014-12-16 19:59 UTC, Chris Cormack
Details | Diff | Splinter Review
BUG 13468: Overdue notice lists all checked out books (1.66 KB, patch)
2014-12-17 10:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Yuval Hager 2014-12-15 21:13:30 UTC
I noticed this after upgrading to 3.18.1 (from 3.16). If a patron has overdue
items, they receive the overdue notice, but the list of overdue items includes
all the books they have checked out, not only the overdue ones.

I also get this error on the cron run, not sure if it's related:
Use of uninitialized value $borrowernumber in string eq at
/usr/share/koha/bin/cronjobs/overdue_notices.pl line 544.

Installed on Debian from the koha repositories.
Comment 1 Katrin Fischer 2014-12-16 08:20:48 UTC
I Yuval,

can you tell us a bit about your setup? How is the overdues script run in your installation? The script has several options that can be used, so knowing what happens on your system might help to get this fixed.
Comment 2 Martin Renvoize 2014-12-16 16:18:18 UTC
We're seeing this too now...

/usr/share/koha/bin/cronjobs/overdue_notices.pl -t

A quick look t the code, -t is 'triggered', and the last bug to touch that was Bug 12529.
Comment 3 Martin Renvoize 2014-12-16 16:29:46 UTC
(In reply to Martin Renvoize from comment #2)
Our setting for 'OverduenoticeCalendar' was set to ignore if that helps
Comment 4 Chris Cormack 2014-12-16 16:57:36 UTC
(In reply to Martin Renvoize from comment #3)
> (In reply to Martin Renvoize from comment #2)
> Our setting for 'OverduenoticeCalendar' was set to ignore if that helps

Can you bisect it until you find the commit for sure. Otherwise it'll have to wait for a while until I have any time to look at it.
Comment 5 Martin Renvoize 2014-12-16 17:21:03 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize 2014-12-16 17:23:22 UTC
Sorry Chris, you beat me to this one.

I believe this patch does the business...

My fault for missing it during QA of your patch.. I'm pretty sure it's that Holidays patch that exposed the problem.
Comment 7 Yuval Hager 2014-12-16 17:45:46 UTC
(In reply to Katrin Fischer from comment #1)
> I Yuval,
> 
> can you tell us a bit about your setup? How is the overdues script run in
> your installation? The script has several options that can be used, so
> knowing what happens on your system might help to get this fixed.

This has probably been resolved, but I don't want to leave your question unanswered. I use the standard debian cron runs:

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

Thanks for the quick resolution!
Comment 8 Chris Cormack 2014-12-16 19:59:58 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2014-12-17 10:08:53 UTC
Created attachment 34479 [details] [review]
BUG 13468: Overdue notice lists all checked out books

This patch should fix the issue when running under 'triggered' mode

To test:

1) Run overdue_notices.pl -t -n [to output notices to command
line]
2) Note that the notices output, list ALL checked out items
3) Apply Patch
4) Run again
5) Note the difference

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove space changes.
Comment 10 Tomás Cohen Arazi 2014-12-17 22:34:24 UTC
Patch pushed to master.

Thanks Martin!
Comment 11 Chris Cormack 2014-12-18 00:45:11 UTC
No string changes, pushed to 3.18.x will be in 3.18.2
Comment 12 Mason James 2014-12-22 19:25:55 UTC
(In reply to Chris Cormack from comment #11)
> No string changes, pushed to 3.18.x will be in 3.18.2

skipping patch for 3.16.x