[Evergreen-general] Setting up a trigger for overdue items notification

Linda Jansová linda.jansova at gmail.com
Mon May 2 02:26:49 EDT 2022


Dear all,

We are on Evergreen 3.6.4 and are trying to make the following trigger 
(notification email) work. We have some other notification emails 
working correctly, so I suppose we probably have something wrong with 
the trigger configuration itself rather than with the email server.

This notification is supposed to send an email to users who have not 
returned their checked-out item(s) in time - it should send the message 
one day after the due date.

Currently, we have the following setup:

*Owning Library*: JAB

*Name: *1 Day Overdue Email Notification - Jabok

*Hook:* checkout.due

*Enabled:* True

*Processing Delay:* 1 day

*Processing Delay Context Field:* due_date

*Processing Group Context Field:* usr

*Reactor: *SendEmail

*Validator:* CircIsOverdue

*Granularity:* Daily

*Max Event Validity Delay:* 2 days

*Template:*

[%- USE date -%]
[%- user = target.0.usr -%]
To: [%- params.recipient_email || user.email %]
From: [%- params.sender_email || default_sender %]
Subject: Nevracene knihy

Ctenar: [% user.family_name %], [% user.first_given_name %]

Dovolujeme si Vas  upozornit, ze uplynula vypujcni lhuta u nekterych 
vypujcentych knihovnich jednotek. Na Vasem konte zacalo nabyvat zpozdne 
ve vysi 2 Kc za knihovni jednotku a den.

Vypujcky s uplynulou vypujcni lhutou jiz NELZE PRODLOUZIT a proto je 
nutne je prinest k vraceni do knihovny (pokud nejsou rezervovane jinym 
ctenarem, je pote eventualne mozne jejich opetovne pujceni).
Dokud nebudou vraceny (a zaroven dokud nebudou zaplaceny poplatky za 
zpozdne), je ctenarske konto blokovano a NENI MOZNE PRODLUZOVAT VYPUJCNI 
LHUTU zadnych vypujcenych knihovnich jednotek ani PUJCOVAT NEBO 
REZERVOVAT ZADNE DOKUMENTY. Je take pozastavena moznost splneni drive 
zadanych rezervaci nebo blokaci.


Seznam knihovnich jednotech, u kterych jiz uplynula vypujcni lhuta:

[% FOR circ IN target %]
     [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
     Nazev: [% copy_details.title %]
     Autor: [% copy_details.author %]
     Carovy kon: [% circ.target_copy.barcode %]
     K vraceni dne: [% date.format(helpers.format_date(circ.due_date), 
'%Y-%m-%d') %]


[% END %]

All other available fields are empty in our setup.

Compared to 7 Day Overdue Email Notification from 
https://demo.evergreencatalog.com/eg/staff/admin/local/action_trigger/event_definition 
(which is Evergreen 3.8.0), fields Context Bib Path, Context Item Path 
and Context Library Path are missing from our interface. Have they been 
added to the interface in some of the more recent Evergreen versions? Or 
is it something we have lost along the way when migrating from older 
Evergreen versions (during the upgrade process)? This installation of 
ours is actually more than a decade old and keeps being upgraded each 
year...

Also, I have noticed that our template actually does not include:

Date: [%- date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]

Auto-Submitted: auto-generated

However, we have another one that seems to be working fine where these 
two lines are also omitted...

The aforementioned 3.8.0 Evergreen demo also has - compared to what we have:

*Opt-In Setting Type*: circ.default_overdue_notices_enabled

*Opt-In User**Field:* usr

What is also different is that we have a daily granularity while the 
demo installation does not have any. Also, the demo server has a longer 
Max Event Validity Delay - 8 days - while we only have two (maybe two 
days are not sufficient in this case?).

(I understand that the demo server may not include the pristine setup of 
this trigger as anybody could change it so - probably in theory rather 
than in practice - some non-default values might have been inserted 
since it was last replaced with the original demo/default data. However, 
I think it may be a good starting point for making the comparisons anyway.)

Does anyone have any idea what should be wrong in our configuration? Or 
where else should we look (like library opening hours, granularity 
values accepted by the cron job or something else entirely)?

Thank you in advance for sharing any tips!

Linda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-general/attachments/20220502/f0368b24/attachment.htm>


More information about the Evergreen-general mailing list