Hi Raymund,
You can skip items that are not due for auto-renewal with this line:
[%- NEXT IF checkout.auto_renew_error == 'auto_too_soon' %]
When our notice included this line, ByWater also added this code at the
beginning of the notice to skip the notice entirely if none of the items were
due for auto-renewal assessment:
[%- SET all_too_soon = 1 %]
[%- FOREACH checkout IN checkouts %]
[%- IF checkout.auto_renew_error != 'auto_too_soon' %]
[%- SET all_too_soon = 0 %]
[%- END %]
[%- END %]
[%- UNLESS all_too_soon %]
(paste the rest of the notice here)
[%- END %]
Emily Lamancusa (she/her)
IT Specialist III
Montgomery County Public Libraries
(240) 777-0052
________________________________
From: Raymund Delahunty <[email protected]>
Sent: Tuesday, July 11, 2023 3:05 AM
To: Koha <[email protected]>
Subject: [Koha] AUTO_RENEWALS_DGST template toolkit problem.
Can anyone suggest how we might re-write the TT code to prevent items not due
for auto-renewal assessment appearing in the digest email? The simple [%
FOREACH checkout IN checkouts %] means every title on loan is mentioned in the
digest, with items not considered for renewal appearing often in between items
that were due for renewal assessment. If we are stuck with this mess, is there
a way of grouping the irrelevant titles together, away from the items that were
assessed for renewal, with a heading such as 'Other items on your account'? We
have been testing on the digest as shipped with 22.11 and also with 23.05 and
both digests do this- include the irrelevant titles often mixed in with items
which renewed, or which did not. We have improved our 22.11 version by
including an additional renewal failure reason [% ELSIF
checkout.auto_renew_error == 'auto_account_expired' %] but we still have
problems with the digest as it stands.
This email and any attachments are intended solely for the addressee and may
contain confidential information. If you are not the intended recipient of this
email and/or its attachments you must not take any action based upon them and
you must not copy or show them to anyone. Please send the email back to us and
immediately and permanently delete it and its attachments. Where this email is
unrelated to the business of University of the Arts London or of any of its
group companies the opinions expressed in it are the opinions of the sender and
do not necessarily constitute those of University of the Arts London (or the
relevant group company). Where the sender's signature indicates that the email
is sent on behalf of UAL Short Courses Limited the following also applies: UAL
Short Courses Limited is a company registered in England and Wales under
company number 02361261. Registered Office: University of the Arts London, 272
High Holborn, London WC1V 7EY
[https://www.montgomerycountymd.gov/mcg/Resources/Images/Cybersecurity-footer.png]
For more helpful Cybersecurity Resources, visit:
https://www.montgomerycountymd.gov/cybersecurity
_______________________________________________
Koha mailing list http://koha-community.org
[email protected]
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha