Bug 29698: Make items available for PREDUEDGST
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 15 Dec 2021 09:09:22 +0000 (10:09 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 5 May 2022 00:29:24 +0000 (14:29 -1000)
commitf19201a12ce1a0a611bc1fdee9ead5f3ba25a419
treeb534367899c868eb48c04846dc539dd3318251b6
parent023e5eb0cad8a88116f51d0a5e90c42093cd4113
Bug 29698: Make items available for PREDUEDGST

With this patch you can access items using:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

== test plan ==
1. Add the following to PREDUEDGST and DUEDST:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

2. Find a patron and set there messaging prefs 'Item due' and 'Advanced
  notices' so they get an email and 'digest only'.
  On 'Advanced notices' set Days in advance to 1.
3. Check some things out to a patron and make them due tomorrow.
4. perl /kohadevbox/koha/misc/cronjobs/advance_notices.pl -v -c
5. Check the patrons notices and make sure the PREDUEDGST looks right.
6. Check some things out to a patron and make them due today.
7. Repeat 4.
8. Check the patrons notices and make sure the DUEDGST looks right.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/cronjobs/advance_notices.pl