Bug 17966: TT syntax for notices - Prove that ISSUESLIP is compatible
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 17 Jan 2017 03:32:58 +0000 (04:32 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 1 Sep 2017 20:06:55 +0000 (17:06 -0300)
commitbe4f624b326574a14260c94c90aeb10a9ab56d91
tree9ec1ed67b955d88d82fbd0c0099b3df783489f6a
parentba1f2f93ef58c8dd935add3e215facdd4a589d12
Bug 17966: TT syntax for notices - Prove that ISSUESLIP is compatible

Here we go, you will notice at the dependency list that this one is a
bit different.
In our former syntax we have 2 custom tags <checkedout> and <overdue>.
These tags were allowed to permit loop on the checked out items and the
overdue items.

In this patch, we will use the "loops" parameter, introduced by bug
17971, to pass the list of checkouts and overdues to the template.

Note that Kyle suggested another approach on bug 15283: all the
checkouts were send into the same array and each element of this
array calls the is_from_today method, to know if the checkout is an
overdue.
I don't think we should rely on the Koha API, that's why I suggest to
pass 2 differents object list, 1 which contains the checkouts and
another one with the overdues.
Note that we do rely on the Koha API, we call the Koha::Checkout->item
and Koha::Item->biblio to propose an equivalent TT notice. But I think
we can accept that.

Test plan:
Define the ISSUESLIP and ISSUEQSLIP notice templates to generate the
same notices you generated with the historical syntax.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=17969

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Letters.pm
C4/Members.pm
t/db_dependent/Letters/TemplateToolkit.t