BEGIN;
SELECT evergreen.upgrade_deps_block_check('0974', :eg_version); -- tmccanna/gmcharlt
UPDATE action_trigger.event_definition SET template =
$$
[%- USE date -%]
[%- SET user = target.0.usr -%]
[% date.format %]
Holds for:
[% user.family_name %], [% user.first_given_name %]
[% FOR hold IN target %]
[%-
SET idx = loop.count - 1;
SET udata = user_data.$idx;
-%]
-
Title: [% udata.item_title %]
Author: [% udata.item_author %]
Pickup Location: [% udata.pickup_lib %]
Status:
[%- IF udata.ready -%]
Ready for pickup
[% ELSE %]
#[% udata.queue_position %] of
[% udata.potential_copies %] copies.
[% END %]
[% END %]
$$ WHERE id=12
AND template =
$$
[%- USE date -%]
[%- SET user = target.0.usr -%]
[% date.format %]
[% user.family_name %], [% user.first_given_name %]
[% FOR hold IN target %]
[%-
SET idx = loop.count - 1;
SET udata = user_data.$idx
-%]
-
Title: [% hold.bib_rec.bib_record.simple_record.title %]
Author: [% hold.bib_rec.bib_record.simple_record.author %]
Pickup Location: [% hold.pickup_lib.name %]
Status:
[%- IF udata.ready -%]
Ready for pickup
[% ELSE %]
#[% udata.queue_position %] of [% udata.potential_copies %] copies.
[% END %]
[% END %]
$$
;
COMMIT;