Bug 15967: Use the email template if the print template does not exist
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 4 Apr 2016 10:31:21 +0000 (11:31 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Tue, 5 Apr 2016 15:14:48 +0000 (15:14 +0000)
commitea4a2436e274d8f0a5082ef6b6944c400ad69d88
tree998f25fb89ded923af793a2afb74ddbb879e3f6b
parentfaaa2cbcdb1970866be4f8a7001bf2de305823a9
 Bug 15967: Use the email template if the print template does not exist

From commit 581759e985c170db0edb4a895cda641930e5ac11
 Bug 14133: Print notices should be generated with the print
 template

"""
IMPORTANT NOTE: This test plan does not take into account the notices
generated for the staff ("These messages were not sent directly to the
patrons."). However the behavior will also change, the print template
will be used in all cases. Is it what we want?
"""

Yes, it is what we want. But if the print template does not exist, the
notice is not generated, we'd like to get the email template instead.

Test plan:
- Remove the print template for the letter you use for overdues
- Define an overdue rule to send an email
- Remove the email address for the patron which has overdues
- Execute the overdue_notices script
The staff should get an email notice and a print notice (using the
email template) should be generated for the patron

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
misc/cronjobs/overdue_notices.pl