@@ -, +, @@
---
.../bug_30484-add-ill-update-notice.pl | 22 ++++++
.../mysql/en/mandatory/sample_notices.yml | 68 +++++++++++++++++++
.../sample_notices_message_attributes.sql | 3 +-
.../sample_notices_message_transports.sql | 5 +-
.../en/includes/messaging-preference-form.inc | 1 +
.../prog/en/modules/admin/categories.tt | 1 +
.../bootstrap/en/modules/opac-messaging.tt | 1 +
7 files changed, 99 insertions(+), 2 deletions(-)
create mode 100755 installer/data/mysql/atomicupdate/bug_30484-add-ill-update-notice.pl
--- a/installer/data/mysql/atomicupdate/bug_30484-add-ill-update-notice.pl
+++ a/installer/data/mysql/atomicupdate/bug_30484-add-ill-update-notice.pl
@@ -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";
+ }
+ },
+};
--- a/installer/data/mysql/en/mandatory/sample_notices.yml
+++ a/installer/data/mysql/en/mandatory/sample_notices.yml
@@ -832,6 +832,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: ""
@@ -948,6 +982,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: ""
--- a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql
+++ a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql
@@ -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);
--- a/installer/data/mysql/mandatory/sample_notices_message_transports.sql
+++ a/installer/data/mysql/mandatory/sample_notices_message_transports.sql
@@ -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');
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
@@ -29,6 +29,7 @@
[% END %]
[% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
[% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
+ [% ELSIF ( messaging_preference.Ill_update ) %]Interlibrary loan updated
[% ELSIF ( messaging_preference.Auto_Renewals ) %]Auto renewal
[% ELSE %]Unknown
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
@@ -598,6 +598,7 @@
[% ELSIF ( prefs.Item_Checkout ) %]Item checkout
[% ELSIF ( prefs.Ill_ready ) %]Interlibrary loan ready
[% ELSIF ( prefs.Ill_unavailable ) %]Interlibrary loan unavailable
+ [% ELSIF ( prefs.Ill_update ) %]Interlibrary loan updated
[% ELSIF ( prefs.Auto_Renewals ) %]Auto renewal
[% ELSIF ( prefs.Hold_Reminder ) %]Hold reminder
[% ELSE %]Unknown
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
@@ -75,6 +75,7 @@
[% END %]
[% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
[% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
+ [% ELSIF ( messaging_preference.Ill_update ) %]Interlibrary loan updated
[% ELSIF ( messaging_preference.Auto_Renewals ) %]Auto renewal
[% ELSE %]Unknown [% END %]
[% IF ( messaging_preference.takes_days ) %]
--