Bug 3482 - Print overdue and hold notices for patrons without email addresses
Summary: Print overdue and hold notices for patrons without email addresses
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: PC All
: PATCH-Sent (DO NOT USE) enhancement with 10 votes (vote)
Assignee: Galen Charlton
QA Contact:
Depends on:
Reported: 2009-08-02 06:40 UTC by Jane Wagner
Modified: 2012-10-25 23:04 UTC (History)
5 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:11:13 UTC

---- Reported by jwagner@ptfs.com 2009-08-02 18:40:24 ----

Sponsored by East Brunswick Public Library, East Brunswick, NJ, USA.

If a patron does not have an email address for overdue or hold notices, an html file is generated in a specified directory which can be opened/downloaded by library staff.  The notice file can be formatted to match Z mailers or other mailer layouts.  The html file is set up to obey the notice file formatting and spacing, and to insert a page break between notices for printing.

The overdues.pl script was modified to allow printing overdues to a specified path and file.  A new script was added to collect hold notices and send to a specified path.  Print overdues use the same notice file as emailed overdues; print holds require a new notice file named HOLD_PRINT.

---- Additional Comments From dbavousett@ptfs.com 2009-11-25 17:46:54 ----

Pull request for branch http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3482 of PTFS’s public repository at git://github.com/ptfs/Koha-PTFS.git sent to koha-patches list on 25 Nov 2009.

---- Additional Comments From jwagner@ptfs.com 2009-11-25 20:22:01 ----

Some hints on how we run these -- the overdues cron is set up as

overdue_notices.pl -t -html /tmp/noticedir -itemscontent issuedate,date_due,title,barcode,author

(We wanted to use only certain item fields in our notices, so we specified itemscontent fields in the cron entry; that's not a requirement for the feature.)  The command line needs to specify a web-accessible directory where the print notices will go -- they get a filename like notices-2009-11-24.html (or holdnotices-2009-11-24.html).  The overdue notice itself can be formatted to fit a Z-mailer.  Within the notice file, the text is spaced down or over to where it will print properly on the form.  The script has code that wraps around the notice file to tell the HTML to obey the formatting, and to do a page break between notices.  That's so that when staff print it out, they get one per page.  We had to add an extra syspref (PrintNoticesMaxLines) to specify page length because our client allows a _lot_ of checkouts which meant some notices were running onto multiple pages.  That syspref says to truncate the print notice at that page length and put in a message about go check your OPAC account for the full list.

The print and email overdues use the same notice file.  The print notices for holds are different -- there's a separate HOLD_PRINT notice file and the system uses it if there's no email address.  Then a nightly cron job runs to gather those up from the message queue and put them in an HTML file in the notice directory, as above.  The cron entry is

gather_print_notices.pl /tmp/noticedir

---- Additional Comments From tajoli@cilea.it 2009-11-26 11:44:16 ----

The direct link of the commit is 

---- Additional Comments From gmcharlt@gmail.com 2010-03-17 00:15:08 ----

Patches pushed to HEAD.  Please test and close.

--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:11 UTC  ---

This bug was previously known as _bug_ 3482 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3482

Unknown operating system Windows 2000. Setting to default OS "All".
Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was jwagner@ptfs.com.
The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, gmcharlt@gmail.com.
   Previous assignee was kohaprogrammers@ptfs.com.

Comment 1 Chris Cormack 2010-12-15 08:19:47 UTC
This is still awaiting testing