Koha How-To

Putting Item Information Into Notices

The text of notices in Koha can be customized through Tools > Notices. There are some fields in the notices in brackets <<like this>> that Koha can fill in automatically for you. The information in these fields can be specific to the patron, the library, or to the items that correspond with the notice. I want to address specifically the fields with information about the item.

On overdue notices, it is possible to use <item></item> tags to list out the fields that you want to have automatically filled in.

In Tools > Notices, you click on Edit beside the Overdue Notice, and in the message body you write:

Dear <<borrowers.firstname>> <<borrowers.surname>>,

According to our records, the following items are overdue. Please return them as soon as possible.

<item> “<<biblio.title>>‚Äù by <<biblio.author>>, Due Date: <<issues.date_due>> </item>

Thank you,

Library Staff

The notice will look like this:

Dear John Doe,

According to our records, the following items are overdue. Please return them as soon as possible:

“The Wellspring‚Äù by Sharon Olds, Due Date: 04/12/2012

Thank you,

Library Staff

However, you can only use the <item></item> tags on overdue notices. I repeat, you can only use the <item></item> tags on overdue notices! If you want information about the item to appear, for example, on your Advance Notice of Item Due, then you need to use <<items.content>>.

This is a two step process. First, from Tools > Notices, you click on Edit, and in the message body you write:

Dear <<borrowers.firstname>> <<borrowers.surname>>,

The following item will be due soon:

<<items.content>>

Next, you will need to make sure that the cron job knows what information to automatically fill in for the <<items.content>> tag. You will tell Koha what information to put in by editing the advancenotices.pl cron job. (You may need to ask your support provider for help with this step.) You will add:

-itemscontent date_due,title,author

On a Git installation, the cron job should look something like this:

# ADVANCE NOTICES
30 8 * * * $KOHA_CRON_PATH/advance_notices.pl-c -itemscontent date_due,title,author

On a package installation, the cron job should look something like this:

koha-foreach –enabled –email /usr/share/koha/bin/cronjobs/advance_notices.pl-c –itemscontent date_due,title,author

Once those two steps are complete, the notice will look like this:

Dear John Doe,

The following item will be due soon:

04/22/2012 “The Wellspring‚Äù Sharon Olds

The only tricky thing to remember here is that you can use <<items.content>> for any kind of notice, but you can only use <item></item> tags on overdue notices.