[Koha] Template toolkit puzzle 1.

Tomas Cohen Arazi tomascohen at gmail.com
Thu Dec 8 00:06:22 NZDT 2022


Are you sure the MySQL syntax for dates works on Template::Toolkit?

El mié, 7 dic 2022 5:59, Raymund Delahunty <r.delahunty at arts.ac.uk>
escribió:

> I had one last crack at this, as I realised I should be looking for users
> whose datexpiry is **yesterday**, when preparing the ODUE email at 1am
> after the account expires the previous day:
> [% IF borrower.dateexpiry = DATE_SUB(CURDATE(), INTERVAL 1 DAY)  %]
> That didn't work either- no ODUE sent at all, so I am giving up on the TT
> for now.
>
> -----Original Message-----
> From: Koha <koha-bounces at lists.katipo.co.nz> On Behalf Of Raymund
> Delahunty
> Sent: 06 December 2022 08:07
> To: Thomas Klausner <domm at plix.at>; koha at lists.katipo.co.nz
> Subject: Re: [Koha] Template toolkit puzzle 1.
>
> 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 _______________________________________________
>
> 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
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list