[Koha] Template toolkit puzzle 1.

Raymund Delahunty r.delahunty at arts.ac.uk
Tue Dec 6 21:07:01 NZDT 2022


Thanks Domm, for pointing out the typo, but that typo was only in the email sent to the list. I have rerun two tests using two ‘bracketed’ versions and have received different results.
[% IF borrower.dateexpiry == CURDATE()  %]
[% IF (borrower.dateexpiry = CURDATE() ) %]
The first version triggered the use of the second optional wording wrongly, while the second version triggered the use of the first wording wrongly. I have no idea what’s going on and might as well give up on the TT code testing, which is very disappointing as I had high hopes for improving our notices with the TT. (And especially if I could make it stop sending notices in specific defined situations).
Ray Delahunty
University of the Arts London




.

-----Original Message-----
From: Koha <koha-bounces at lists.katipo.co.nz> On Behalf Of Thomas Klausner
Sent: 02 December 2022 06:57
To: koha at lists.katipo.co.nz
Subject: Re: [Koha] Template toolkit puzzle 1.

Hi!

On Fri, Dec 02, 2022 at 06:31:31AM +0000, Raymund Delahunty wrote:

> But when I try to use a TT rule in the ODUE message, no email is sent at all- there appears to be an error:
> [% IF (borrower.dateexpiry == CURDATE() %]

Hot sure how much pseudocode this is, but you're missing a closing parenthesis after CURDATE():

  [% IF (borrower.dateexpiry == CURDATE() ** ) ** %]

Greetings,
domm


--
#!/usr/bin/perl                             https://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
_______________________________________________

Koha mailing list  http://koha-community.org Koha at lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
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


More information about the Koha mailing list