Bug 29557: Add auto_account_expired to AUTO_RENEWALS
It was missing and the notice sent was not providing the reason of the failure. Test plan: Check an item out with a date in the past, mark it as auto renew Modify the expired date of the patron and set it in the past Run the automatic_renewals.pl cronjob script, confirm that the notice now contains the reason of the failure. QA note: The template will be updated only for English installations. Should we add an alert for others? Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
f004ad000d
commit
9c10d75443
2 changed files with 17 additions and 0 deletions
15
installer/data/mysql/atomicupdate/bug_29557.pl
Executable file
15
installer/data/mysql/atomicupdate/bug_29557.pl
Executable file
|
@ -0,0 +1,15 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "29557",
|
||||
description => "Add auto_account_expired to AUTO_RENEWALS",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
my @c = $dbh->do(q{
|
||||
UPDATE letter
|
||||
SET content=REPLACE(content, "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]\r\nThis item must be renewed at the library.\r\n[% END %]", "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]\r\nThis item must be renewed at the library.\r\n[% ELSIF checkout.auto_renew_error == 'auto_account_expired' %]\r\nYour account has expired.\r\n[% END %]")
|
||||
WHERE code="AUTO_RENEWALS"
|
||||
});
|
||||
},
|
||||
}
|
|
@ -1509,6 +1509,8 @@ tables:
|
|||
- "Your total unpaid fines are too high."
|
||||
- "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]"
|
||||
- "This item must be renewed at the library."
|
||||
- "[% ELSIF checkout.auto_renew_error == 'auto_account_expired' %]"
|
||||
- "Your account has expired."
|
||||
- "[% END %]"
|
||||
- "[% ELSE %]"
|
||||
- "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
|
||||
|
|
Loading…
Reference in a new issue