<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dear all,</p>
<p>We are trying to make our action triggers work - we are on a 3.6
system and so far we have not found a working solution for a
trigger that would send an email after a bib record is created.<br>
</p>
<p>As we suspect that there might be something wrong with our
crontab, attached is its current crontab setup.</p>
<p>Bellow are two action triggers which we have (both
unsuccessfully) tried. The first one uses our original template
code (which - for some reason - had worked before we upgraded to
3.6 last year) and the second one uses the template code from a
3.9 community demo system
(<a class="moz-txt-link-freetext" href="https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/31">https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/31</a>).
I am well aware that there is a version mismatch in the second
case but we decided to at least give it a try before digging
deeper.<br>
</p>
<b></b>
<p style="line-height: 100%; margin-bottom: 0cm; page-break-before:
always"><b>
Action trigger with original template code and settings
(Evergreen
3.6):</b></p>
<p style="line-height: 100%; margin-bottom: 0cm"><b>Owning Library:
</b>CONS<b><br>
Name:</b>
biblio.record_entry.email<b><br>
Hook: </b>biblio.format.record_entry.email<b><br>
Enabled:</b> ticked<b><br>
Processing Delay:</b>
00:00:00<b><br>
Processing Delay
Context Field:</b> empty<b><br>
Processing Group
Context Field:</b> owner<b><br>
Reactor:</b> SendEmail<b><br>
Validator:</b> NOOP_True<b><br>
Event Repeatability
Delay:</b> empty</p>
<b></b><b>Definition ID:</b> 165<b><br>
Failure Cleanup:</b>
DeleteTempBiblioBucket<b><br>
Granularity:</b> empty<b><br>
Max Event Validity
Delay:</b> empty<b><br>
Message Library
Path:</b> empty<b><br>
Message Template:</b>
empty<b><br>
Message Title:</b> empty<b><br>
Message User Path:</b>
empty<b><br>
Opt-In Setting Type:</b>
empty<b><br>
Opt-In User Field:</b> empty<b><br>
Retention Interval:</b>
empty<b><br>
Success Cleanup:</b>
DeleteTempBiblioBucket<b><br>
Template:</b>
<p style="line-height: 100%; margin-bottom: 0cm">[%- SET user =
target.0.owner -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">To: [%-
params.recipient_email || user.email %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">From: [%-
params.sender_email || default_sender %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Subject: Informace
o
dokumentech v katalogu </p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% FOR cbreb IN
target %][% title = '' %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% FOR item IN
cbreb.items;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> bre_id =
item.target_biblio_record_entry;</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"> bibxml =
helpers.unapi_bre(bre_id, {flesh => '{mra}'});</p>
<p style="line-height: 100%; margin-bottom: 0cm"> FOR part IN
bibxml.findnodes('//*[@tag="245"]/*[@code="a" or
@code="b"]');</p>
<p style="line-height: 100%; margin-bottom: 0cm"> title =
title _ part.textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> END;</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"> author =
bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> item_type =
bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');</p>
<p style="line-height: 100%; margin-bottom: 0cm"> publisher =
bibxml.findnodes('//*[@tag="260" or
@tag="264"]/*[@code="b"]').textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> pubdate =
bibxml.findnodes('//*[@tag="260" or
@tag="264"]/*[@code="c"]').textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> isbn =
bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> issn =
bibxml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> upc =
bibxml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;</p>
<p style="line-height: 100%; margin-bottom: 0cm">%]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> </p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">Číslo záznamu [%
bre_id %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% title %] [%
author %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% publisher %] [%
pubdate %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF isbn %]ISBN:
[% isbn %][% END %][% IF issn %]ISSN: [% issn %][% END %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Odkaz na záznam ve
Společném katalogu Evergreen:
<a class="moz-txt-link-freetext" href="http://spok.jabok.cuni.cz/eg/opac/record/">http://spok.jabok.cuni.cz/eg/opac/record/</a>[% bre_id %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% END %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% END %]</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">-----------</p>
<p style="line-height: 100%; margin-bottom: 0cm">TIP: Odkaz na
záznam(y) v katalogu vaší knihovny:</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">Pokud chcete
vytvořit odkaz na knihu/dokument přímo do katalogu vaší
knihovny, přidejte čísla záznamu na konec níže uvedeného URL
vaší knihovny (za poslední lomítko):</p>
<p style="line-height: 100%; margin-bottom: 0cm">- Knihovna Jabok:
<a class="moz-txt-link-freetext" href="https://knihovna.jabok.cuni.cz/eg/opac/record/">https://knihovna.jabok.cuni.cz/eg/opac/record/</a></p>
<p style="line-height: 100%; margin-bottom: 0cm">- Evangelikální
teologický seminář: <a class="moz-txt-link-freetext" href="https://ets.jabok.cuni.cz/eg/opac/record/">https://ets.jabok.cuni.cz/eg/opac/record/</a> </p>
<p style="line-height: 100%; margin-bottom: 0cm">- Jáchymka:
<a class="moz-txt-link-freetext" href="https://jachymka.jabok.cuni.cz/eg/opac/record/">https://jachymka.jabok.cuni.cz/eg/opac/record/</a></p>
<p style="line-height: 100%; margin-bottom: 0cm">- Katolický domov
studujících: <a class="moz-txt-link-freetext" href="https://kds.jabok.cuni.cz/eg/opac/record/">https://kds.jabok.cuni.cz/eg/opac/record/</a> </p>
<p style="line-height: 100%; margin-bottom: 0cm">- Člověk v tísni:
<a class="moz-txt-link-freetext" href="https://clovekvtisni.jabok.cuni.cz/eg/opac/record/">https://clovekvtisni.jabok.cuni.cz/eg/opac/record/</a> </p>
<p style="line-height: 100%; margin-bottom: 0cm">- Hospic Dobrého
Pastýře: <a class="moz-txt-link-freetext" href="https://dobrypastyr.jabok.cuni.cz/eg/opac/record/">https://dobrypastyr.jabok.cuni.cz/eg/opac/record/</a> </p>
<p>
<style type="text/css">p { line-height: 115%; margin-bottom: 0.25cm; background: transparent }</style></p>
<p><br>
</p>
<p><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"><b>
Action trigger with template code from the community demo server
(Evergreen 3.9):</b></p>
<p style="line-height: 100%; margin-bottom: 0cm"><b>Owning Library:</b>
CONS<b><br>
Name:</b>
BibliografickeZaznamyEmail<b><br>
Hook:</b>
biblio.format.record_email</p>
<b>Enabled:</b> ticked<b><br>
Processing Delay:</b>
00:00:00<b><br>
Processing Delay
Context Field:</b> empty<b><br>
Processing Group
Context Field:</b> owner<b><br>
Reactor: </b>SendEmail<b><br>
Validator:</b> NOOP_True<b><br>
Event Repeatability
Delay:</b> empty<b><br>
Definition ID:</b> 213<b><br>
Failure Cleanup:</b>
DeleteTempBiblioBucket<b><br>
Granularity:</b> empty<b><br>
Max Event Validity
Delay:</b> empty<b><br>
Message Library
Path:</b> empty<b><br>
Message Template:</b>
empty<b><br>
Message Title:</b> empty<b><br>
Message User Path:</b>
empty<b><br>
Opt-In Setting Type:</b>
empty<b><br>
Opt-In User Field:</b>
empty<b><br>
Retention Interval:</b>
empty<b><br>
Success Cleanup:</b>
DeleteTempBiblioBucket<b><br>
Template:</b>
<p style="line-height: 100%; margin-bottom: 0cm">[%- USE date -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[%- SET user =
target.0.owner -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">To: [%-
params.recipient_email || user_data.0.email || user.email %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">From: [%-
params.sender_email || default_sender %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Date: [%-
date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Subject: [%-
user_data.0.subject || 'Bibliographic Records' %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Auto-Submitted:
auto-generated</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">[%- FOR cbreb IN
target;</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"> flesh_list =
'{mra';</p>
<p style="line-height: 100%; margin-bottom: 0cm"> IF
user_data.0.type == 'full';</p>
<p style="line-height: 100%; margin-bottom: 0cm"> flesh_list =
flesh_list _ ',holdings_xml,acp';</p>
<p style="line-height: 100%; margin-bottom: 0cm"> IF
params.holdings_limit;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> flimit =
'acn=>' _ params.holdings_limit _ ',acp=>' _
params.holdings_limit;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> END;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> END;</p>
<p style="line-height: 100%; margin-bottom: 0cm"> flesh_list =
flesh_list _ '}';</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"> item_list =
helpers.sort_bucket_unapi_bre(cbreb.items,{flesh => flesh_list,
site => user_data.0.context_org, flesh_limit => flimit},
user_data.0.sort_by, user_data.0.sort_dir);</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">FOR item IN
item_list -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% loop.count %]/[%
loop.size %]. Bib ID# [% item.id %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF item.isbn
%]ISBN: [% item.isbn _ "\n" %][% END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF item.issn
%]ISSN: [% item.issn _ "\n" %][% END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF item.upc
%]UPC: [% item.upc _ "\n" %][% END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Title: [%
item.title
%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF item.author
%]Author: [% item.author _ "\n" %][% END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Publication Info:
[%
item.publisher %] [% item.pubdate %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">Item Type: [%
item.item_type %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF
user_data.0.type == 'full' && item.holdings.size == 0 %]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> * No items for
this
record at the selected location</p>
<p style="line-height: 100%; margin-bottom: 0cm">[%- END %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% FOR cp IN
item.holdings -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> * Library: [%
cp.circ_lib %]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> Location: [%
cp.location %]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> Call Number: [%
cp.prefix _ ' ' _ cp.callnumber _ ' ' _ cp.suffix %]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% IF cp.parts %]
Parts: [% cp.parts _ "\n" %][% END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> Status: [%
cp.status_label %]</p>
<p style="line-height: 100%; margin-bottom: 0cm"> Barcode: [%
cp.barcode %]</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">[% END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[%- END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm">[%- END -%]</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">Do you have any
idea about what might be preventing the trigger from working
properly? Or could you please share your working config?<br>
</p>
<p>Or is there a way to switch on a debug mode in logging that could
shed more light on what is happening in our system when it comes
to action triggers and emails?</p>
<p>Thank you very much for any hints!</p>
<p>Linda<br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"><b> </b>
</p>
</body>
</html>