Troubleshooting Notices 7


Email notices aren’t going out to your patrons! Oh no!

Here are a few things to check:

  1. Are the correct cron jobs enabled? Log into your server and check the crontab, or ask your support provider for help with this step. There are several cron jobs related to email notices:
    • overdue_notices , this prepares overdue messages and puts them into the message queue (usually runs overnight)
    • advance_notices , this prepares advance notices (pre-due) and item due notices and puts them into the message queue (usually runs overnight)
    • process_message_queue , this sends out the emails that are in the message queue (can run as often as hourly)
    • More info: http://manual.koha-community.org/3.8/en/cronjobsch.html#cronjobs
  2. Is the overdue notice text correct? Go to Tools > Notices & Slips.
    • There are some default notices that come with Koha that use a particular notice code. One example is the “HOLD” email. The code has to be exactly like that for these notices to work properly. If you change it to “Hold,” you might have problems.
    • If you’re using different notices for different branches, you need to use a unique code for each one. For example, if Branch A has an overdue notice with code ODUE, and Branch B has an overdue notice with code ODUE as well, then you’re just asking for trouble! How will Koha know which ODUE notice to send? Try using ODUEA and ODUEB instead, and be sure to reference the branch in the description as well.
    • If notices are going out but do not contain the correct info, try editing the text of the notice here.
    • More info: http://manual.koha-community.org/3.8/en/tools.html#notices
  3. Are your overdue notice/status triggers correct? Go to Tools > Overdue notice/status triggers.
    • Be sure that you have selected the correct library in the “Select a library‚Äù dropdown menu, or set default status triggers for all of your libraries.
    • Enter a delay. You must have a number in the delay box for a notice to go out. This is the number of days after the due date that the overdue notice will be sent. For example, if you want to send the first overdue notice on the first day the item is overdue, click on the “First‚Äù tab and enter a 1 in this box. If you want to send the second overdue notice when the item has been overdue for one whole week, click on the “Second‚Äù tab and enter a 7 in this box.
    • Choose which notice you want to send from the “First/Second/Third letter‚Äù dropdown menus on each tab. Remember , these triggers are for OVERDUE notices only, so don’t choose anything that is not an overdue notice. If you choose something from this dropdown menu that is not an overdue notice, then it will not make sense when your patrons receive it. Also, be sure to choose the notice that corresponds to the correct branch here if you are using different notices for each branch. (This is why using the branch name in the notice description is important.)
    • More info : http://manual.koha-community.org/3.8/en/tools.html#noticetriggers

In my experience, most problems with notices can be resolved by thoroughly checking on the three questions above. If not, the next step I would take is to peruse the message_queue and see what you see:

  • If you see messages in the message_queue with “sent‚Äù status, then this tells you that in general emails are going out from your Koha server.
  • If a patron complains about not receiving a message that shows a “sent‚Äù status in Koha, have the patron verify his email address, check his spam folder, or check with his systems administrator to make sure emails can be received at the other end.

If you know emails are definitely working, then it’s something of a logic puzzle to figure out why a particular patron did not receive a notice for a particular item. You sometimes have to pick it apart a bit more:

  • If one branch isn’t receiving emails but another branch is, check to make sure both branches have a valid email address in Administration > Libraries and groups.
  • If patrons are receiving the first overdue email but not the third overdue email, go check the notice triggers again.
  • If it doesn’t seem like many patrons are receiving emails, go to Administration > System Preferences > AutoEmailPrimaryAddress. Make sure this is set to “Use first valid patron email address for sending out emails.‚Äù

Another good quick check is to see whether or not the patrons who should have received overdue emails today did. Here’s a SQL report that you can use to show patrons with overdue items who hit the notice trigger today:

SELECT borrowers.surname,
borrowers.firstname,
borrowers.cardnumber,
borrowers.email,
items.barcode,
issues.date_due,
(TO_DAYS(curdate())-TO_DAYS(date_due)) AS ‘days_overdue’
FROM borrowers
LEFT JOIN issues ON (borrowers.borrowernumber=issues.borrowernumber)
LEFT JOIN items ON (issues.itemnumber=items.itemnumber)
WHERE (TO_DAYS(curdate())-TO_DAYS(date_due)) = ‘ENTER DELAY OF FIRST OVERDUE NOTICE HERE
ORDER BY borrowers.email

If you get 0 results, that means there weren’t any patrons with overdue items that hit the first trigger today, and therefore, no first overdue notices should have gone out today. You can next try changing the WHERE clause to the delay that you have set in your notice triggers for the second or third overdue notice.

Then, you want to compare the above list of patrons to what is in your message queue:

SELECT *
FROM message_queue
WHERE letter_code = ‘ODUE’
AND time_queued > ‘ENTER TODAY’S DATE YYYY-MM-DD‘;

That’s going to show you the notices that were put in the message_queue today (assuming you have the overdue_notices cron job running overnight , otherwise adjust the date accordingly). If there are patrons in the results of the first query that hit the trigger today, then we should also see an overdue email for that patron in the results of the second query. Even if the patron doesn’t have a valid email address, he or she should appear in the print overdue email that is sent to the library.

I hope you find these generic troubleshooting ideas for notices helpful. If all of the above looks correct, but notices still don’t seem to be working, it’s possible that you may have found a bug! I’d say it’s time to check the Koha community Bugzilla to see if there are any bugs related to notices, or contact your support provider for further assistance.


Leave a comment

Your email address will not be published. Required fields are marked *

Are you human? * Time limit is exhausted. Please reload CAPTCHA.

7 thoughts on “Troubleshooting Notices

  • Watson Mick

    How do I use the ‘Advance Notice’? I can’t put a value below 1 in ‘delay’ therefore how can I send an advance notice about the book that’s about to due?

  • InfoSystem Grauer Raum

    Hello,

    the overdue notice works but the fine syntax (EUR) doesn`t work.
    Part of the used notice syntax: <>; <>; Doc-Nummer: <> Die Mahnkosten betragen: EUR

    Do you know the reason?

    Thanks,

    Stefan

    • Barton Chittenden

      Advanced notices are created by the ‘advanced_notices.pl’, which runs nightly. This script uses the same logic to determine whether an item is checked in as the circulation system itself, and that logic is very robust — however there are several timing issues that can deliver advanced notices to a patron after they have left the item at the library for check-in:

      If the item was returned in the book drop, it may not have actually been checked in to Koha when advanced_notices.pl was run, even though the check-in was back-dated such that the return date shows before the notice was sent.

      The script ‘advanced_notices.pl’ creates notices to be sent, and puts them in Koha’s ‘message_queue’. There is a job which is typically run every 15 minutes called ‘process_message_queue.pl’, which processes the queue and actually puts the messages in the outbound email. If process_message_queue.pl is running slowly, or if it’s not scheduled to run often enough, notices may be delayed such that an advanced notice is sent after an item has been returned.

      Finally, it is possible that the email itself may be delayed — generally, email is delivered nearly instantaneously, but this is not guaranteed. Delays of hours or days are unlikely, but not unheard of.