Bug 15967: Use the email template if the print template does not exist
commit03c9871ada24643ce8874a17980d18798f212c95
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 4 Apr 2016 10:31:21 +0000 (4 11:31 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 6 Apr 2016 13:01:49 +0000 (6 15:01 +0200)
tree7ea3afc277c751a0b98ba7c3c281576e3bfc315b
parent8664af5e20716d1a849b1deb26e48927b4921c5a
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>
(cherry picked from commit ea4a2436e274d8f0a5082ef6b6944c400ad69d88)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
misc/cronjobs/overdue_notices.pl