Bug 12473 - Overdue notices listing wrong items
Summary: Overdue notices listing wrong items
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-24 16:28 UTC by Katrin Fischer
Modified: 2015-06-04 23:23 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-06-24 16:28:05 UTC
To my understanding when using overdue_notices.pl -t without --list-all the generated notices should only list items due exactly on the date calculated from the triggers. This doesn't seem to be always the case:

SETUP

- Testing on a fresh database with sample data installed
- Added superlibrarian user, Midway
- Added 14 records with 1 item itemtype „Books“ each at Midway
- Added circulation condition: any-any-any:
  * Loan period: 1 day
- Added 3 different overdue notices ODUE1-3, having both item syntaxes:

<<items.content>>

----

<item>
Title: <<biblio.title>>
Due date: <<items.onloan>>
Barcode: <<items.barcode>>
</item>

- Set Notice triggers for all libraries: 7, 14, 21, only email checked
- Checked out all 14 books, with due dates in the past, starting from yesterday (-1 below) to 2 days ago.
- Ran: overdue_notices.pl -t -v

RESULTS

Due date today-1 = yesterday, Overdue notice listed
-1		
-2		
-3		
-4		
-5		
-6	
-7, 1st
-8, 1st
-9, 1st
-10, 1st
-11, 1st
-12, 1st
-13, 1st
-14, 2nd

I expected, that the first overdue notice would only list the item exactly 7 days overdue.

With --list-all all 14 overdue items are listed in the notice, which seems correct.

I am not sure if I am missing something here - would be happy if someone could confirm if that is or is not the expected behaviour.
Comment 1 Katrin Fischer 2014-06-24 17:13:02 UTC
For reference:

=item B<-t> | B<--triggered>

This option causes a notice to be generated if and only if 
an item is overdue by the number of days defined in a notice trigger.

By default, a notice is sent each time the script runs, which is suitable for 
less frequent run cron script, but requires syncing notice triggers with 
the  cron schedule to ensure proper behavior.
Add the --triggered option for daily cron, at the risk of no notice 
being generated if the cron fails to run on time.

=item B<-list-all>

Default items.content lists only those items that fall in the 
range of the currently processing notice.
Choose list-all to include all overdue items in the list (limited by B<-max> setting).
Comment 2 Katrin Fischer 2014-06-24 17:37:47 UTC
Thinking about it more... this might be the expected behaviour:

Triggers: 7,14,21
First notice: 7-13 days overdue
Second notice: 14 days overdue

In that case the mention of a 'range' in the documentation would make sense.

Leaving this bug open for the moment.