Bug 30484: Add ILL update notice
Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=28909 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
7eca36202d
commit
adf0094d66
|
|
@ -0,0 +1,22 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "30484",
|
||||
description => "Add a notice template for ILL Update notices",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
$dbh->do(q{INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UPDATE', '', 'ILL request update', 0, "Interlibrary loan request update", "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe Interlibrary loans request number [% illrequest.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nhas been updated\n\nDetails of the update are below:\n\n[% additional_text %]\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'email', 'default');});
|
||||
$dbh->do(q{INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UPDATE', '', 'ILL request update', 0, "Interlibrary loan request update", "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe Interlibrary loans request number [% illrequest.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nhas been updated\n\nDetails of the update are below:\n\n[% additional_text %]\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');});
|
||||
$dbh->do(q{INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_update', 0);});
|
||||
my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef);
|
||||
if (defined $ready_id) {
|
||||
$dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE');));
|
||||
$dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'sms', 0, 'ill', 'ILL_REQUEST_UPDATE');));
|
||||
$dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');));
|
||||
say $out "Bug 30484 DB update complete";
|
||||
} else {
|
||||
say $out "Bug 30484 DB update not completed";
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
@ -838,6 +838,40 @@ tables:
|
|||
- "[% branch.branchillemail %]"
|
||||
- "[% branch.branchemail %]"
|
||||
|
||||
- module: ill
|
||||
code: ILL_REQUEST_UPDATE
|
||||
branchcode: ""
|
||||
name: "ILL request update"
|
||||
is_html: 0
|
||||
title: "Interlibrary loan request update"
|
||||
message_transport_type: email
|
||||
lang: default
|
||||
content:
|
||||
- "Dear [% borrower.firstname %] [% borrower.surname %],"
|
||||
- ""
|
||||
- "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
|
||||
- ""
|
||||
- "- [% ill_bib_title %] - [% ill_bib_author %]"
|
||||
- ""
|
||||
- "has been updated."
|
||||
- ""
|
||||
- "Details of the update are below:"
|
||||
- ""
|
||||
- "[% additional_text %]"
|
||||
- ""
|
||||
- "Kind Regards"
|
||||
- ""
|
||||
- "[% branch.branchname %]"
|
||||
- "[% branch.branchaddress1 %]"
|
||||
- "[% branch.branchaddress2 %]"
|
||||
- "[% branch.branchaddress3 %]"
|
||||
- "[% branch.branchcity %]"
|
||||
- "[% branch.branchstate %]"
|
||||
- "[% branch.branchzip %]"
|
||||
- "[% branch.branchphone %]"
|
||||
- "[% branch.branchillemail %]"
|
||||
- "[% branch.branchemail %]"
|
||||
|
||||
- module: ill
|
||||
code: ILL_PICKUP_READY
|
||||
branchcode: ""
|
||||
|
|
@ -954,6 +988,40 @@ tables:
|
|||
- "[% branch.branchillemail %]"
|
||||
- "[% branch.branchemail %]"
|
||||
|
||||
- module: ill
|
||||
code: ILL_REQUEST_UPDATE
|
||||
branchcode: ""
|
||||
name: "ILL request update"
|
||||
is_html: 0
|
||||
title: "Interlibrary loan request update"
|
||||
message_transport_type: sms
|
||||
lang: default
|
||||
content:
|
||||
- "Dear [% borrower.firstname %] [% borrower.surname %],"
|
||||
- ""
|
||||
- "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
|
||||
- ""
|
||||
- "- [% ill_bib_title %] - [% ill_bib_author %]"
|
||||
- ""
|
||||
- "has been updated."
|
||||
- ""
|
||||
- "Details of the update are below:"
|
||||
- ""
|
||||
- "[% additional_text %]"
|
||||
- ""
|
||||
- "Kind Regards"
|
||||
- ""
|
||||
- "[% branch.branchname %]"
|
||||
- "[% branch.branchaddress1 %]"
|
||||
- "[% branch.branchaddress2 %]"
|
||||
- "[% branch.branchaddress3 %]"
|
||||
- "[% branch.branchcity %]"
|
||||
- "[% branch.branchstate %]"
|
||||
- "[% branch.branchzip %]"
|
||||
- "[% branch.branchphone %]"
|
||||
- "[% branch.branchillemail %]"
|
||||
- "[% branch.branchemail %]"
|
||||
|
||||
- module: members
|
||||
code: DISCHARGE
|
||||
branchcode: ""
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ values
|
|||
(7, 'Ill_ready', 0),
|
||||
(8, 'Ill_unavailable', 0),
|
||||
(9, 'Auto_Renewals', 0),
|
||||
(10, 'Hold_Reminder', 0);
|
||||
(10, 'Hold_Reminder', 0),
|
||||
(11, 'Ill_update', 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,4 +38,7 @@ values
|
|||
(10, 'email', 0, 'circulation', 'HOLD_REMINDER'),
|
||||
(10, 'sms', 0, 'circulation', 'HOLD_REMINDER'),
|
||||
(10, 'phone', 0, 'circulation', 'HOLD_REMINDER'),
|
||||
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER');
|
||||
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER'),
|
||||
(11, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE'),
|
||||
(11, 'sms', 0, 'ill', 'ILL_REQUEST_UPDATE'),
|
||||
(11, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
[% END %]
|
||||
[% ELSIF ( messaging_preference.Ill_ready ) %]<span>Interlibrary loan ready</span>
|
||||
[% ELSIF ( messaging_preference.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
|
||||
[% ELSIF ( messaging_preference.Ill_update ) %]<span>Interlibrary loan updated</span>
|
||||
[% ELSIF ( messaging_preference.Auto_Renewals ) %]<span>Auto renewal</span>
|
||||
[% ELSE %]<span>Unknown</span>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -639,6 +639,7 @@
|
|||
[% ELSIF ( prefs.Item_Checkout ) %]<span>Item checkout</span>
|
||||
[% ELSIF ( prefs.Ill_ready ) %]<span>Interlibrary loan ready</span>
|
||||
[% ELSIF ( prefs.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
|
||||
[% ELSIF ( prefs.Ill_update ) %]<span>Interlibrary loan updated</span>
|
||||
[% ELSIF ( prefs.Auto_Renewals ) %]<span>Auto renewal</span>
|
||||
[% ELSIF ( prefs.Hold_Reminder ) %]<span>Hold reminder</span>
|
||||
[% ELSE %]<span>Unknown</span>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
[% END %]
|
||||
[% ELSIF ( messaging_preference.Ill_ready ) %]<span>Interlibrary loan ready</span>
|
||||
[% ELSIF ( messaging_preference.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
|
||||
[% ELSIF ( messaging_preference.Ill_update ) %]<span>Interlibrary loan updated</span>
|
||||
[% ELSIF ( messaging_preference.Auto_Renewals ) %]<span>Auto renewal</span>
|
||||
[% ELSE %]<span>Unknown</span> [% END %]</td>
|
||||
[% IF ( messaging_preference.takes_days ) %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue