From 8dd24b57bea47265786d6d2cb1cf38c04433447c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 9 Jul 2020 11:18:26 +0100 Subject: [PATCH] Bug 22818: (QA follow-up) Sample Notices Convert the update notices to TT syntax and add them into the sample_notices file. Signed-off-by: Martin Renvoize --- .../bug_22818_add_ill_notices.perl | 20 +- .../mysql/en/mandatory/sample_notices.yml | 232 ++++++++++++++++++ 2 files changed, 242 insertions(+), 10 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_22818_add_ill_notices.perl b/installer/data/mysql/atomicupdate/bug_22818_add_ill_notices.perl index 9df46a0813..298c72c44b 100644 --- a/installer/data/mysql/atomicupdate/bug_22818_add_ill_notices.perl +++ b/installer/data/mysql/atomicupdate/bug_22818_add_ill_notices.perl @@ -7,16 +7,16 @@ if( CheckVersion( $DBversion ) ) { $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLDefaultStaffEmail', '', 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', NULL, 'Free'); | ); $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLSendStaffNotices', NULL, 'Send these ILL notices to staff', NULL, 'multiple'); | ); # Add new notices - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear <> <>,\n\nThe Interlibrary loans request number <> you placed for:\n\n- <> - <>\n\nis ready for pick up from <>.\n\nKind Regards\n\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>", '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_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear <> <>,\n\nThe Interlibrary loans request number <> you placed for\n\n- <> - <>\n\nis unfortunately unavailable.\n\nKind Regards\n\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>", '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_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request <>, with the following details, has requested cancellation of this ILL request:\n\n<>", '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_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request <>, with the following details, has modified this ILL request:\n\n<>", 'email', 'default'); | ); - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n<>\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>", 'email', 'default'); | ); - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear <> <>,\n\nThe Interlibrary loans request number <> you placed for:\n\n- <> - <>\n\nis ready for pick up from <>.\n\nKind Regards\n\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>", 'sms', 'default'); | ); - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear <> <>,\n\nThe Interlibrary loans request number <> you placed for\n\n- <> - <>\n\nis unfortunately unavailable.\n\nKind Regards\n\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>", 'sms', 'default'); | ); - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request <>, with the following details, has requested cancellation of this ILL request:\n\n<>", 'sms', 'default'); | ); - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request <>, with the following details, has modified this ILL request:\n\n<>", 'sms', 'default'); | ); - $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n<>\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>\n<>", 'sms', 'default'); | ); + $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear [% borrowers.firstname %] [% borrowers.surname %],\n\nThe Interlibrary loans request number [% illrequests.illrequest_id %] you placed for:\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nis ready for pick up from [% branches.branchname %].\n\nKind Regards\n\n[% branches.branchname %]\n[% branches.branchaddress1 %]\n[% branches.branchaddress2 %]\n[% branches.branchaddress3 %]\n[% branches.branchcity %]\n[% branches.branchstate %]\n[% branches.branchzip %]\n[% branches.branchphone %]\n[% branches.branchillemail %]\n[% branches.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_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear [% borrowers.firstname %] [% borrowers.surname %],\n\nThe Interlibrary loans request number [% illrequests.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nis unfortunately unavailable.\n\nKind Regards\n\n[% branches.branchname %]\n[% branches.branchaddress1 %]\n[% branches.branchaddress2 %]\n[% branches.branchaddress3 %]\n[% branches.branchcity %]\n[% branches.branchstate %]\n[% branches.branchzip %]\n[% branches.branchphone %]\n[% branches.branchillemail %]\n[% branches.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_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", '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_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'email', 'default'); | ); + $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branches.branchname %]\n[% branches.branchaddress1 %]\n[% branches.branchaddress2 %]\n[% branches.branchaddress3 %]\n[% branches.branchcity %]\n[% branches.branchstate %]\n[% branches.branchzip %]\n[% branches.branchphone %]\n[% branches.branchillemail %]\n[% branches.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_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear [% borrowers.firstname %] [% borrowers.surname %],\n\nThe Interlibrary loans request number [% illrequests.illrequest_id %] you placed for:\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nis ready for pick up from [% branches.branchname %].\n\nKind Regards\n\n[% branches.branchname %]\n[% branches.branchaddress1 %]\n[% branches.branchaddress2 %]\n[% branches.branchaddress3 %]\n[% branches.branchcity %]\n[% branches.branchstate %]\n[% branches.branchzip %]\n[% branches.branchphone %]\n[% branches.branchillemail %]\n[% branches.branchemail %]", 'sms', 'default'); | ); + $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear [% borrowers.firstname %] [% borrowers.surname %],\n\nThe Interlibrary loans request number [% illrequests.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nis unfortunately unavailable.\n\nKind Regards\n\n[% branches.branchname %]\n[% branches.branchaddress1 %]\n[% branches.branchaddress2 %]\n[% branches.branchaddress3 %]\n[% branches.branchcity %]\n[% branches.branchstate %]\n[% branches.branchzip %]\n[% branches.branchphone %]\n[% branches.branchillemail %]\n[% branches.branchemail %]", 'sms', 'default'); | ); + $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default'); | ); + $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default'); | ); + $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branches.branchname %]\n[% branches.branchaddress1 %]\n[% branches.branchaddress2 %]\n[% branches.branchaddress3 %]\n[% branches.branchcity %]\n[% branches.branchstate %]\n[% branches.branchzip %]\n[% branches.branchphone %]\n[% branches.branchillemail %]\n[% branches.branchemail %]", 'sms', 'default'); | ); # Add patron messaging preferences $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_ready', 0); | ); my $ready_id = $dbh->{mysql_insertid}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 50bb421386..0bf1922b9b 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -659,6 +659,238 @@ tables: - "" - "Ordernumber <> (<>) (<> ordered) ($<> each) has not been received." + - module: ill + code: ILL_PICKUP_READY + branchcode: "" + name: "ILL request ready for pickup" + is_html: 0 + title: "Interlibrary loan request ready for pickup" + message_transport_type: email + lang: default + content: + - "Dear [% borrowers.firstname %] [% borrowers.surname %]," + - "" + - "The Interlibrary loans request number [% illrequests.illrequest_id %] you placed for:" + - "" + - "- [% ill_bib_title %] - [% ill_bib_author %]" + - "" + - "is ready for pick up from [% branches.branchname %]." + - "" + - "Kind Regards" + - "" + - "[% branches.branchname %]" + - "[% branches.branchaddress1 %]" + - "[% branches.branchaddress2 %]" + - "[% branches.branchaddress3 %]" + - "[% branches.branchcity %]" + - "[% branches.branchstate %]" + - "[% branches.branchzip %]" + - "[% branches.branchphone %]" + - "[% branches.branchillemail %]" + - "[% branches.branchemail %]" + + - module: ill + code: ILL_REQUEST_UNAVAIL + branchcode: "" + name: "ILL request unavailable" + is_html: 0 + title: "Interlibrary loan request unavailable" + message_transport_type: email + lang: default + content: + - "Dear [% borrowers.firstname %] [% borrowers.surname %]," + - "" + - "The Interlibrary loans request number [% illrequests.illrequest_id %] you placed for" + - "" + - "- [% ill_bib_title %] - [% ill_bib_author %]" + - "" + - "is unfortunately unavailable." + - "" + - "Kind Regards" + - "" + - "[% branches.branchname %]" + - "[% branches.branchaddress1 %]" + - "[% branches.branchaddress2 %]" + - "[% branches.branchaddress3 %]" + - "[% branches.branchcity %]" + - "[% branches.branchstate %]" + - "[% branches.branchzip %]" + - "[% branches.branchphone %]" + - "[% branches.branchillemail %]" + - "[% branches.branchemail %]" + + - module: ill + code: ILL_REQUEST_CANCEL + branchcode: "" + name: "ILL request cancelled" + is_html: 0 + title: "Interlibrary loan request cancelled" + message_transport_type: email + lang: default + content: + - "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has requested cancellation of this ILL request:" + - "" + - "[% ill_full_metadata %]" + + - module: ill + code: ILL_REQUEST_MODIFIED + branchcode: "" + name: "ILL request modified" + is_html: 0 + title: "Interlibrary loan request modified" + message_transport_type: email + lang: default + content: + - "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has modified this ILL request:" + - "" + - "[% ill_full_metadata %]" + + - module: ill + code: ILL_PARTNER_REQ + branchcode: "" + name: "ILL request to partners" + is_html: 0 + title: "Interlibrary loan request to partners" + message_transport_type: email + lang: default + content: + - "Dear Sir/Madam," + - "" + - "We would like to request an interlibrary loan for a title matching the following description:" + - "" + - "[% ill_full_metadata %]" + - "" + - "Please let us know if you are able to supply this to us." + - "" + - "Kind Regards" + - "" + - "[% branches.branchname %]" + - "[% branches.branchaddress1 %]" + - "[% branches.branchaddress2 %]" + - "[% branches.branchaddress3 %]" + - "[% branches.branchcity %]" + - "[% branches.branchstate %]" + - "[% branches.branchzip %]" + - "[% branches.branchphone %]" + - "[% branches.branchillemail %]" + - "[% branches.branchemail %]" + + - module: ill + code: ILL_PICKUP_READY + branchcode: "" + name: "ILL request ready for pickup" + is_html: 0 + title: "Interlibrary loan request ready for pickup" + message_transport_type: sms + lang: default + content: + - "Dear [% borrowers.firstname %] [% borrowers.surname %]," + - "" + - "The Interlibrary loans request number [% illrequests.illrequest_id %] you placed for:" + - "" + - "- [% ill_bib_title %] - [% ill_bib_author %]" + - "" + - "is ready for pick up from [% branches.branchname %]." + - "" + - "Kind Regards" + - "" + - "[% branches.branchname %]" + - "[% branches.branchaddress1 %]" + - "[% branches.branchaddress2 %]" + - "[% branches.branchaddress3 %]" + - "[% branches.branchcity %]" + - "[% branches.branchstate %]" + - "[% branches.branchzip %]" + - "[% branches.branchphone %]" + - "[% branches.branchillemail %]" + - "[% branches.branchemail %]" + + - module: ill + code: ILL_REQUEST_UNAVAIL + branchcode: "" + name: "ILL request unavailable" + is_html: 0 + title: "Interlibrary loan request unavailable" + message_transport_type: sms + lang: default + content: + - "Dear [% borrowers.firstname %] [% borrowers.surname %]," + - "" + - "The Interlibrary loans request number [% illrequests.illrequest_id %] you placed for" + - "" + - "- [% ill_bib_title %] - [% ill_bib_author %]" + - "" + - "is unfortunately unavailable." + - "" + - "Kind Regards" + - "" + - "[% branches.branchname %]" + - "[% branches.branchaddress1 %]" + - "[% branches.branchaddress2 %]" + - "[% branches.branchaddress3 %]" + - "[% branches.branchcity %]" + - "[% branches.branchstate %]" + - "[% branches.branchzip %]" + - "[% branches.branchphone %]" + - "[% branches.branchillemail %]" + - "[% branches.branchemail %]" + + - module: ill + code: ILL_REQUEST_CANCEL + branchcode: "" + name: "ILL request cancelled" + is_html: 0 + title: "Interlibrary loan request cancelled" + message_transport_type: sms + lang: default + content: + - "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has requested cancellation of this ILL request:" + - "" + - "[% ill_full_metadata %]" + + - module: ill + code: ILL_REQUEST_MODIFIED + branchcode: "" + name: "ILL request modified" + is_html: 0 + title: "Interlibrary loan request modified" + message_transport_type: sms + lang: default + content: + - "The patron for interlibrary loans request [% illrequests.illrequest_id %], with the following details, has modified this ILL request:" + - "" + - "[% ill_full_metadata %]" + + - module: ill + code: ILL_PARTNER_REQ + branchcode: "" + name: "ILL request to partners" + is_html: 0 + title: "Interlibrary loan request to partners" + message_transport_type: sms + lang: default + content: + - "Dear Sir/Madam," + - "" + - "We would like to request an interlibrary loan for a title matching the following description:" + - "" + - "[% ill_full_metadata %]" + - "" + - "Please let us know if you are able to supply this to us." + - "" + - "Kind Regards" + - "" + - "[% branches.branchname %]" + - "[% branches.branchaddress1 %]" + - "[% branches.branchaddress2 %]" + - "[% branches.branchaddress3 %]" + - "[% branches.branchcity %]" + - "[% branches.branchstate %]" + - "[% branches.branchzip %]" + - "[% branches.branchphone %]" + - "[% branches.branchillemail %]" + - "[% branches.branchemail %]" + - module: members code: ACCTDETAILS branchcode: "" -- 2.20.1