Bugzilla – Attachment 134626 Details for
Bug 30484
Interlibrary loans should have the ability to send notices based on request supplier updates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30484: Add ILL update notice
Bug-30484-Add-ILL-update-notice.patch (text/plain), 11.29 KB, created by
Andrew Isherwood
on 2022-05-05 09:22:40 UTC
(
hide
)
Description:
Bug 30484: Add ILL update notice
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2022-05-05 09:22:40 UTC
Size:
11.29 KB
patch
obsolete
>From 98f112950229e8393df243fadc4a81efc4ab9854 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Fri, 8 Apr 2022 16:06:37 +0100 >Subject: [PATCH] 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 >--- > .../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 > >diff --git a/installer/data/mysql/atomicupdate/bug_30484-add-ill-update-notice.pl b/installer/data/mysql/atomicupdate/bug_30484-add-ill-update-notice.pl >new file mode 100755 >index 0000000000..06583df78c >--- /dev/null >+++ b/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"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 6eb3c43084..97f06a121c 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/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: "" >diff --git a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql b/installer/data/mysql/mandatory/sample_notices_message_attributes.sql >index 6cabc4e92e..bd0294c960 100644 >--- a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql >+++ b/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); > >diff --git a/installer/data/mysql/mandatory/sample_notices_message_transports.sql b/installer/data/mysql/mandatory/sample_notices_message_transports.sql >index 2a224996c7..d1fae4c0ce 100644 >--- a/installer/data/mysql/mandatory/sample_notices_message_transports.sql >+++ b/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'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >index 279e78c84c..1fe1d67696 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >@@ -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 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >index efdb5f86d4..2067ffac66 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -598,6 +598,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> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index c99ff825e0..d8c5ae6e08 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/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 %]</td> > [% IF ( messaging_preference.takes_days ) %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30484
:
133394
|
133395
|
133396
|
133399
|
133400
|
133401
|
134486
|
134487
|
134488
|
134569
|
134570
|
134571
|
134572
|
134573
|
134574
|
134626
|
134627
|
134628
|
138859
|
138860
|
138861
|
138862