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 <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-07-09 11:18:26 +01:00 committed by Jonathan Druart
parent 14986fce53
commit ccdba691ff
2 changed files with 242 additions and 10 deletions

View file

@ -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 <<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'); | );
$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};

View file

@ -659,6 +659,238 @@ tables:
- ""
- "<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>"
- 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: ""