From 07f86d704b11689e09bd6414e45b0ed2f7014f5d Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 4 Feb 2020 02:59:23 +0000 Subject: [PATCH] Bug 20453: Adding notice to be sent when cancelling holds Sponsored-by: Waikato Institute of Technology --- .../mysql/atomicupdate/bug20453_hold_cancelled_notice.perl | 7 +++++++ installer/data/mysql/de-DE/mandatory/sample_notices.sql | 3 ++- installer/data/mysql/en/mandatory/sample_notices.yml | 13 +++++++++++++ installer/data/mysql/fr-CA/obligatoire/sample_notices.sql | 3 ++- installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql | 3 ++- installer/data/mysql/it-IT/necessari/notices.sql | 3 ++- .../data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 3 ++- installer/data/mysql/pl-PL/mandatory/sample_notices.sql | 3 ++- installer/data/mysql/ru-RU/mandatory/sample_notices.sql | 3 ++- installer/data/mysql/uk-UA/mandatory/sample_notices.sql | 4 +++- 10 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug20453_hold_cancelled_notice.perl diff --git a/installer/data/mysql/atomicupdate/bug20453_hold_cancelled_notice.perl b/installer/data/mysql/atomicupdate/bug20453_hold_cancelled_notice.perl new file mode 100644 index 0000000000..3cbaf52b68 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug20453_hold_cancelled_notice.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email') }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20453 - Adding HOLD_MANUAL_CANCEL notice)\n"; +} diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 0bf9d28c5d..d7538253d9 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -21,7 +21,8 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('suggestions','REJECTED','Anschaffungsvorschlag nicht angenommen', 'Ihr Anschaffungsvorschlag wurde nicht angenommen','Liebe(r) <> <>,\n\nSie haven der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <> von <>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und sich gegen eine Anschaffung entschieden.\n\nBegründung: <>\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <>.\n\nVielen Dank,\n\n<>', 'email'), ('suggestions','TO_PROCESS','Benachrichtigung an Besitzer des Kontos (Erwerbung)', 'Anschaffungsvorschlag wartet auf Bearbeitung','Liebe(r) <> <>,\n\nEin neuer Anschaffungsvorschlag wartet auf Bearbeitung: <> von <>.\n\nVielen Dank,\n\n<>', 'email'), ('suggestions', 'NOTIFY_MANAGER', 'Benachrichtigung an Bearbeiter eines Anschaffungsvorschlags', "Neuer Anschaffungsvorschlag zugewiesen", "Liebe(r) [% borrower.firstname %] [% borrower.surname %],\nIhnen wurde ein Anschaffungsvorschlag zur Bearbeitung zugewiesen: [% suggestion.title %].\nDanke,\n[% branch.branchname %]", 'email'), -('members', 'PROBLEM_REPORT','OPAC-Problemmeldung','OPAC-Problemmeldung','Benutzername: <>\n\nSeite: <>\n\nTitel: <>\n\nNachricht: <>','email'); +('members', 'PROBLEM_REPORT','OPAC-Problemmeldung','OPAC-Problemmeldung','Benutzername: <>\n\nSeite: <>\n\nTitel: <>\n\nNachricht: <>','email'), +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','Neuer Anschaffungsvorschlag','Neuer Anschaffungsvorschlag','

Neuer Anschaffungsvorschlag zur Bearbeitung

diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 50bb421386..734a736a43 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1221,3 +1221,16 @@ tables: - "[%- USE AuthorisedValues -%]" - "Dear [% borrower.firstname %] [% borrower.surname %]," - "Your hold for [% biblio.title %] was canceled for the following reason: [% AuthorisedValues.GetByCode( 'HOLD_CANCELLATION', hold.cancellation_reason ) %]" + + - module: reserves + code: HOLD_MANUAL_CANCEL + branchcode: "" + name: "Hold request has been cancelled by library" + is_html: 0 + title: "Hold request has been cancelled by the library" + message_transport_type: email + lang: default + content: + - "Dear <> <>" + - "" + - "Your hold on: <> (<>) has been cancelled by the library." diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql index 1a231dd12e..d2309e03b2 100644 --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -84,7 +84,8 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Demande d\'article - en attente', 0, 'Demande d\'article reçue', 'Bonjour <> <> (<>)\r\n\r\nNous avons bien reçu votre demande d\'article de <> (<>).\r\n\r\nArticle demandé :\r\nTitre : <>\r\nAuteur : <>\r\nVolume : <>\r\nNuméro : <>\r\nDate : <>\r\nPages : <>\r\nChapitres : <>\r\nNotes : <>\r\n\r\n\r\nMerci.', 'email'), ('circulation', 'AR_SLIP', '', 'Demande d\'article - ticket', 0, 'Demande d\'article', 'Demande d\'article :\r\n\r\n<> <> (<>),\r\n\r\nTitre : <>\r\nCode-barres : <>\r\n\r\nArticle demandé :\r\nTitre : <>\r\nAuteur : <>\r\nVolume : <>\r\nNuméro : <>\r\nDate : <>\r\nPages : <>\r\nChapitres : <>\r\nNotes : <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Demande d\'article - en traitement', 0, 'Demande d\'article en traitement', 'Bonjour <> <> (<>),\r\n\r\nNous traitons votre demande d\'article de <> (<>).\r\n\r\nArticle demandé :\r\nTitre : <>\r\nAuteur : <>\r\nVolume : <>\r\nNuméro : <>\r\nDate : <>\r\nPages : <>\r\nChapitres : <>\r\nNotes : <>\r\n\r\nMerci.', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Notes d\'un utilisateur sur les documents en prêt', '0', 'Notes sur les documents en prêts', '<> <> a ajouté une note sur un exemplaire de <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Notes d\'un utilisateur sur les documents en prêt', '0', 'Notes sur les documents en prêts', '<> <> a ajouté une note sur un exemplaire de <> - <> (<>).','email'), +('reserves', 'HOLD_MANUAL_CANCEL','','Hold request has been cancelled by library',0,'Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES ('members','PASSWORD_RESET','','Récupération de mot de passe en ligne',1,'Récupération de mot de passe','\r\n

Ce courriel vous a été envoyé suite à une demande de récupération de mot de passe pour le compte de <>.\r\n

\r\n

\r\nVous pouvez créer un nouveau mot de passe en cliquant le lien suivant :\r\n
>\"><>\r\n

\r\n

Ce lien sera valide pour 2 jours après la réception de ce courriel. Si vous ne changez pas votre mot de passe d\'ici deux jours, vous devrez faire une nouvelle demande de récuération de mot de passe..

\r\n

Merci.

\r\n\r\n','email'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index f844c90b2a..c2f81ac3af 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -23,7 +23,8 @@ VALUES ('suggestions','TO_PROCESS','Avis au propriétaire du poste budgétaire', 'Une suggestion est prête à être traitée','<> <>,\n\nUne nouvelle suggestion est prête à être traitée : <> / <>.\n\nMerci,\n\n<>', 'email'), ('suggestions', 'NOTIFY_MANAGER', 'Notify manager of a suggestion', "A suggestion has been assigned to you", "Dear [% borrower.firstname %] [% borrower.surname %],\nA suggestion has been assigned to you: [% suggestion.title %].\nThank you,\n[% branch.branchname %]", 'email'), ('members', 'DISCHARGE', 'Quitus', 'Quitus pour <> <>', '

Quitus

\r\n\r\nLa librairie <> certifies que lecteur suivant :\r\n\r\n <> <>\r\n Numéro de carte : <>\r\n\r\na bien retourné tous ses documents.', 'email'), -('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'); +('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'), +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Suggestion pendin g approval

diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 9be907b0b5..ed2e47252d 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -28,7 +28,8 @@ biblio.title>>\r\n----\r\nGrazie per aver visitaro <>.', 'e ('suggestions','TO_PROCESS','Notifica al proprietario del fondo', 'Un suggeerimento è pronto per essere lavorato','Caro bibliotecario <> <>,\n\n c\'è un nuovo suggerimento pronto per essere lavorato: <> by <>.\n\n Grazie dell\'attenzione,\n\n<>', 'email'), ('suggestions', 'NOTIFY_MANAGER', 'Notify manager of a suggestion', "A suggestion has been assigned to you", "Dear [% borrower.firstname %] [% borrower.surname %],\nA suggestion has been assigned to you: [% suggestion.title %].\nThank you,\n[% branch.branchname %]", 'email'), ('members', 'DISCHARGE', 'Liberatoria', 'Liberatoria per <> <>', '

Liberatoria

\r\n\r\nLa biblioteca <> certifica che il seguente utente :\r\n\r\n <> <>\r\n Numero tessera : <>\r\n\r\nha restituito tutti i documenti ricevuti.', 'email'), -('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'); +('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'), +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Suggestion pendin g approval

diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index e3564ffb1d..88491c4ec8 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -43,7 +43,8 @@ VALUES ('circulation','ODUE','Purring','Purring på dokument','<> <>,\n\nA new suggestion is ready to be processed: <> by <>.\n\nThank you,\n\n<>', 'email'), ('suggestions', 'NOTIFY_MANAGER', 'Notify manager of a suggestion', "A suggestion has been assigned to you", "Dear [% borrower.firstname %] [% borrower.surname %],\nA suggestion has been assigned to you: [% suggestion.title %].\nThank you,\n[% branch.branchname %]", 'email'), ('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'), -('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'); +('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'), +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Suggestion pendin g approval

diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index f228b5c68d..3d688a74a3 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -22,7 +22,8 @@ VALUES ('circulation','ODUE','Overdue notice','Item overdue','Dear <> <>,\n\nA new suggestion is ready to be processed: <> by <>.\n\nThank you,\n\n<>', 'email'), ('suggestions', 'NOTIFY_MANAGER', 'Notify manager of a suggestion', "A suggestion has been assigned to you", "Dear [% borrower.firstname %] [% borrower.surname %],\nA suggestion has been assigned to you: [% suggestion.title %].\nThank you,\n[% branch.branchname %]", 'email'), ('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'), -('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'); +('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'), +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Suggestion pendin g approval

diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 27f002b195..921f1c50a5 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -21,7 +21,8 @@ VALUES ('circulation','ODUE','Overdue notice','Item overdue','Dear <> <>,\n\nA new suggestion is ready to be processed: <> by <>.\n\nThank you,\n\n<>', 'email'), ('suggestions', 'NOTIFY_MANAGER', 'Notify manager of a suggestion', "A suggestion has been assigned to you", "Dear [% borrower.firstname %] [% borrower.surname %],\nA suggestion has been assigned to you: [% suggestion.title %].\nThank you,\n[% branch.branchname %]", 'email'), ('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'), -('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'); +('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'), +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Suggestion pendin g approval

diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 17bd9f7606..17ec69ff3e 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -85,7 +85,9 @@ INSERT INTO `letter` (module, code, name, title, content, message_transport_type ('suggestions', 'NOTIFY_MANAGER', 'Notify manager of a suggestion', "A suggestion has been assigned to you", "Dear [% borrower.firstname %] [% borrower.surname %],\nA suggestion has been assigned to you: [% suggestion.title %].\nThank you,\n[% branch.branchname %]", 'email'), -('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email') +('members', 'PROBLEM_REPORT','OPAC problem report','OPAC problem report','Username: <>\n\nProblem page: <>\n\nTitle: <>\n\nMessage: <>','email'), + +('reserves', 'HOLD_MANUAL_CANCEL','Hold request has been cancelled by library','Hold request has been cancelled by the library','Dear <> <>,\n\nYour hold on: <> (<>) has been cancelled by the library.','email') ; INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) -- 2.11.0