Bugzilla – Attachment 100510 Details for
Bug 4461
Add a context-sensitive report a problem process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4461: (follow-up) Creating sample notice and other fixes
Bug-4461-follow-up-Creating-sample-notice-and-othe.patch (text/plain), 36.90 KB, created by
Martin Renvoize (ashimema)
on 2020-03-11 09:12:08 UTC
(
hide
)
Description:
Bug 4461: (follow-up) Creating sample notice and other fixes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-11 09:12:08 UTC
Size:
36.90 KB
patch
obsolete
>From 62fd78e2da02fcd1fb8c38d024d7e8204aac48f3 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 25 Feb 2020 04:04:43 +0000 >Subject: [PATCH] Bug 4461: (follow-up) Creating sample notice and other fixes > >- filters >- capitalisation >- atomic update > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Letters.pm | 1 + > Koha/ProblemReport.pm | 2 +- > Koha/ProblemReports.pm | 2 +- > .../bug-4461_add-problem-report-notice.perl | 7 ++++ > .../bug-4461_add-problem-reports-table.perl | 33 ++++++++++--------- > .../mysql/de-DE/mandatory/sample_notices.sql | 3 +- > .../mysql/en/mandatory/sample_notices.yml | 17 ++++++++++ > .../mysql/es-ES/mandatory/sample_notices.sql | 3 +- > .../fr-CA/obligatoire/sample_notices.sql | 3 +- > .../fr-FR/1-Obligatoire/sample_notices.sql | 3 +- > .../data/mysql/it-IT/necessari/notices.sql | 3 +- > .../nb-NO/1-Obligatorisk/sample_notices.sql | 3 +- > .../mysql/pl-PL/mandatory/sample_notices.sql | 3 +- > .../mysql/ru-RU/mandatory/sample_notices.sql | 3 +- > .../mysql/uk-UA/mandatory/sample_notices.sql | 4 ++- > .../en/modules/opac-reportproblem.tt | 10 +++--- > opac/opac-reportproblem.pl | 19 +++++++---- > tools/letter.pl | 4 +++ > 18 files changed, 84 insertions(+), 39 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-4461_add-problem-report-notice.perl > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 7c5d470bb0..24fb3cf397 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -758,6 +758,7 @@ sub _parseletter_sth { > ($table eq 'borrower_modifications') ? "SELECT * FROM $table WHERE verification_token = ?" : > ($table eq 'subscription') ? "SELECT * FROM $table WHERE subscriptionid = ?" : > ($table eq 'serial') ? "SELECT * FROM $table WHERE serialid = ?" : >+ ($table eq 'problem_reports') ? "SELECT * FROM $table WHERE reportid = ?" : > undef ; > unless ($query) { > warn "ERROR: No _parseletter_sth query for table '$table'"; >diff --git a/Koha/ProblemReport.pm b/Koha/ProblemReport.pm >index 2ab6cb42e9..f93f7fac49 100644 >--- a/Koha/ProblemReport.pm >+++ b/Koha/ProblemReport.pm >@@ -2,7 +2,7 @@ package Koha::ProblemReport; > > # This file is part of Koha. > # >-# Copyright 2019 Aleisha Amohia <aleisha@catalyst.net.nz> >+# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz> > # > # Koha is free software; you can redistribute it and/or modify it under the > # terms of the GNU General Public License as published by the Free Software >diff --git a/Koha/ProblemReports.pm b/Koha/ProblemReports.pm >index ece7f559f3..a36fc3ca73 100644 >--- a/Koha/ProblemReports.pm >+++ b/Koha/ProblemReports.pm >@@ -2,7 +2,7 @@ package Koha::ProblemReports; > > # This file is part of Koha. > # >-# Copyright 2019 Aleisha Amohia <aleisha@catalyst.net.nz> >+# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz> > # > # Koha is free software; you can redistribute it and/or modify it under the > # terms of the GNU General Public License as published by the Free Software >diff --git a/installer/data/mysql/atomicupdate/bug-4461_add-problem-report-notice.perl b/installer/data/mysql/atomicupdate/bug-4461_add-problem-report-notice.perl >new file mode 100644 >index 0000000000..bd642a581a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-4461_add-problem-report-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 ('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email') }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 4461 - Adding PROBLEM_REPORT notice)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl b/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >index 884c301cd4..c8371645d1 100644 >--- a/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >+++ b/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl >@@ -1,22 +1,23 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do(q{ DROP TABLE IF EXISTS `problem_reports` }); > >- $dbh->do(q{ CREATE TABLE problem_reports ( >- reportid int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha >- title varchar(40) NOT NULL default '', -- report subject line >- content varchar(255) NOT NULL default '', -- report message content >- borrowernumber int(11) default NULL, -- the user who created the problem report >- branchcode varchar(10) NOT NULL default '', -- borrower's branch >- username varchar(75) default NULL, -- OPAC username >- problempage varchar(255) default NULL, -- page the user triggered the problem report form from >- recipient enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report >- reportdate datetime default NULL, -- date and time of report submission >- status varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed >- PRIMARY KEY (reportid), >- CONSTRAINT problem_reports_ibfk1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT problem_reports_ibfk2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); >+ if( !TableExists( 'problem_reports' ) ){ >+ $dbh->do(q{ CREATE TABLE problem_reports ( >+ reportid int(11) NOT NULL auto_increment, -- unqiue identifier assigned by Koha >+ title varchar(40) NOT NULL default '', -- report subject line >+ content varchar(255) NOT NULL default '', -- report message content >+ borrowernumber int(11) default NULL, -- the user who created the problem report >+ branchcode varchar(10) NOT NULL default '', -- borrower's branch >+ username varchar(75) default NULL, -- OPAC username >+ problempage varchar(255) default NULL, -- page the user triggered the problem report form from >+ recipient enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report >+ reportdate datetime default NULL, -- date and time of report submission >+ status varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed >+ PRIMARY KEY (reportid), >+ CONSTRAINT problem_reports_ibfk1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT problem_reports_ibfk2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); >+ } > > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 4461: Add problem reports table)\n"; >diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >index 0fdef05f53..93dec2fabf 100644 >--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql >+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >@@ -19,7 +19,8 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <<borrowers.firstname> > ('suggestions','AVAILABLE','Vorgeschlagenes Medium verfügbar', 'Das vorgeschlagene Medium ist jetzt verfügbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Bestand der Bibliothek verfügbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>', 'email'), > ('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verfügbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Anschaffungsvorschlag nicht angenommen', 'Ihr Anschaffungsvorschlag wurde nicht angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haven der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und sich gegen eine Anschaffung entschieden.\n\nBegründung: <<suggestions.reason>>\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>', 'email'), >-('suggestions','TO_PROCESS','Benachrichtigung an Besitzer des Kontos (Erwerbung)', 'Anschaffungsvorschlag wartet auf Bearbeitung','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nEin neuer Anschaffungsvorschlag wartet auf Bearbeitung: <<suggestions.title>> von <<suggestions.author>>.\n\nVielen Dank,\n\n<<branches.branchname>>', 'email'); >+('suggestions','TO_PROCESS','Benachrichtigung an Besitzer des Kontos (Erwerbung)', 'Anschaffungsvorschlag wartet auf Bearbeitung','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nEin neuer Anschaffungsvorschlag wartet auf Bearbeitung: <<suggestions.title>> von <<suggestions.author>>.\n\nVielen Dank,\n\n<<branches.branchname>>', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index a2b7dec89b..38a5290b44 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -1145,3 +1145,20 @@ tables: > - "Thank you," > - "" > - "<<branches.branchname>>" >+ >+ - module: members >+ code: PROBLEM_REPORT >+ branchcode: "" >+ name: "OPAC Problem Report" >+ is_html: 0 >+ title: "OPAC Problem Report" >+ message_transport_type: email >+ lang: default >+ content: >+ - "Username: <<problem_reports.username>>" >+ - "" >+ - "Problem page: <<problem_reports.problempage>>" >+ - "" >+ - "Title: <<problem_reports.title>>" >+ - "" >+ - "Message: <<problem_reports.content>>" >diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >index 417cc64bca..695311d254 100644 >--- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql >+++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >@@ -19,7 +19,8 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), > ('suggestions','TO_PROCESS','Notify fund owner', 'A suggestion is ready to be processed','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nA new suggestion is ready to be processed: <<suggestions.title>> by <<suggestions.author>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), >-('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'); >+('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >index 0a8b2d2011..99e92b61e9 100644 >--- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >@@ -66,7 +66,8 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m > ('acquisition','ACQ_NOTIF_ON_RECEIV','','Notification lors de la réception',0,'Commande reçue','Bonjour <<borrowers.firstname>> <<borrowers.surname>bbbb>,\r\n\r\nLa commande <<aqorders.ordernumber>> (<<biblio.title>>) a été reçue.\r\n\r\n<<branches.branchname>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, message_transport_type) VALUES >-('suggestions','TO_PROCESS','Notification pour le responsable du poste budgétaire', 'Une suggestion est prête à être traitée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\n\nUne nouvelle suggestion est prête à être traitée : <<suggestions.title>> par <<suggestions.author>>.\n\nMerci,\n\n<<branches.branchname>>', 'email'); >+('suggestions','TO_PROCESS','Notification pour le responsable du poste budgétaire', 'Une suggestion est prête à être traitée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\n\nUne nouvelle suggestion est prête à être traitée : <<suggestions.title>> par <<suggestions.author>>.\n\nMerci,\n\n<<branches.branchname>>', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type ) VALUES > ('circulation', 'OVERDUES_SLIP', '', 'Ticket pour les documents en retard', '0', 'OVERDUES_SLIP', 'Le(s) document(s) est/sont présentement en retard : >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 3a80d516bc..e281423a58 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >@@ -21,7 +21,8 @@ VALUES > ('suggestions','ORDERED','Suggestion commandée', 'Suggestion commandée','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une demande de suggestion d\'achat sur le docuement <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous avez demandé est maintenant en commande. Le document devrait arriver rapidement dans nos collections.\n\nVous serez averti quand le docuement sera disponible.\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>\n\nMerci,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Suggestion rejetée', 'Suggestion d\'achat rejeté','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez fait la demande du document <<suggestions.title>> de <<suggestions.author>>.\n\nla Bibliothèque a examiné votre demande ce jour, et a décidé de ne pas retenir la suggestion pour l\'instant.\n\nLa raison est la suivante: <<suggestions.reason>>\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>', 'email'), > ('suggestions','TO_PROCESS','Avis au propriétaire du poste budgétaire', 'Une suggestion est prête à être traitée','<<borrowers.firstname>> <<borrowers.surname>>,\n\nUne nouvelle suggestion est prête à être traitée : <<suggestions.title>> / <<suggestions.author>>.\n\nMerci,\n\n<<branches.branchname>>', 'email'), >-('members', 'DISCHARGE', 'Quitus', 'Quitus pour <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Quitus</h1>\r\n\r\nLa librairie <<borrowers.branchcode>> certifies que lecteur suivant :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Numéro de carte : <<borrowers.cardnumber>>\r\n\r\na bien retourné tous ses documents.', 'email'); >+('members', 'DISCHARGE', 'Quitus', 'Quitus pour <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Quitus</h1>\r\n\r\nLa librairie <<borrowers.branchcode>> certifies que lecteur suivant :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Numéro de carte : <<borrowers.cardnumber>>\r\n\r\na bien retourné tous ses documents.', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql >index 5a5f04cacd..61f9a3f4be 100644 >--- a/installer/data/mysql/it-IT/necessari/notices.sql >+++ b/installer/data/mysql/it-IT/necessari/notices.sql >@@ -26,7 +26,8 @@ biblio.title>>\r\n----\r\nGrazie per aver visitaro <<branches.branchname>>.', 'e > ('suggestions','ORDERED','Suggerimento d\'acquisto ordinato', 'Suggerimento d\'acquisto ordinato','Salve <<borrowers.firstname>> <<borrowers.surname>>,\n\nHai suggerito di acquistare <<suggestions.title>> di <<suggestions.author>>.\n\nTi informiamo che l\'ordine è stata inviato al fornitore della biblioteca. Dovrebbe arrivare in poco tempo, poi verrà aggiunto alla collezione della biblioteca.\n\nRiceverai un\'altra email quando sarà disponibile.\n\nSe hai domande, scrivici pure all\' email <<branches.branchemail>>\n\nGrazie di tutto,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Suggerimento d\'acquisto rifiutato', 'Suggerimento d\'acquisto rifiutato','Salve <<borrowers.firstname>> <<borrowers.surname>>,\n\nHai suggerito di acquistare <<suggestions.title>> di <<suggestions.author>>.\n\na biblioteca ha revisionato il suggerimento oggi e ha deciso di non seguire il suggerimento.\n\nLa motivazione è: <<suggestions.reason>>\n\nSe hai domande, scrivici pure all\' email <<branches.branchemail>>.\n\nGrazie di tuttp,\n\n<<branches.branchname>>', 'email'), > ('suggestions','TO_PROCESS','Notifica al proprietario del fondo', 'Un suggeerimento è pronto per essere lavorato','Caro bibliotecario <<borrowers.firstname>> <<borrowers.surname>>,\n\n c\'è un nuovo suggerimento pronto per essere lavorato: <<suggestions.title>> by <<suggestions.author>>.\n\n Grazie dell\'attenzione,\n\n<<branches.branchname>>', 'email'), >-('members', 'DISCHARGE', 'Liberatoria', 'Liberatoria per <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Liberatoria</h1>\r\n\r\nLa biblioteca <<borrowers.branchcode>> certifica che il seguente utente :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Numero tessera : <<borrowers.cardnumber>>\r\n\r\nha restituito tutti i documenti ricevuti.', 'email'); >+('members', 'DISCHARGE', 'Liberatoria', 'Liberatoria per <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Liberatoria</h1>\r\n\r\nLa biblioteca <<borrowers.branchcode>> certifica che il seguente utente :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Numero tessera : <<borrowers.cardnumber>>\r\n\r\nha restituito tutti i documenti ricevuti.', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >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 921af854fc..2f8d928d19 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >@@ -42,7 +42,8 @@ VALUES ('circulation','ODUE','Purring','Purring pÃ¥ dokument','<<borrowers.first > ('suggestions','ORDERED','Innkjøpsforslag i bestilling', 'Innkjøpsforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslÃ¥tt at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av Ã¥ informere deg om at dokumentet du foreslo nÃ¥ er i bestilling.\n\nDu vil fÃ¥ en ny melding nÃ¥r dokumentet er tilgjengelig.\n\nEr det noe du lurer pÃ¥, vennligst kontakt oss pÃ¥ <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Innkjøpsforslag avslÃ¥tt', 'Innkjøpsforslag avslÃ¥tt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslÃ¥tt at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert innkjøpsforslaget ditt i dag, og bestemt seg for Ã¥ ikke ta det til følge.\n\nBegrunnelse: <<suggestions.reason>>\n\nEr det noe du lurer pÃ¥, vennligst kontakt oss pÃ¥ <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>', 'email'), > ('suggestions','TO_PROCESS','Notify fund owner', 'A suggestion is ready to be processed','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nA new suggestion is ready to be processed: <<suggestions.title>> by <<suggestions.author>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), >-('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'); >+('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >index e031600840..78cb5ef1bc 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >@@ -20,7 +20,8 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), > ('suggestions','TO_PROCESS','Notify fund owner', 'A suggestion is ready to be processed','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nA new suggestion is ready to be processed: <<suggestions.title>> by <<suggestions.author>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), >-('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'); >+('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >index 677ec827bd..2e836259d1 100644 >--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >@@ -19,7 +19,8 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>', 'email'), > ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), > ('suggestions','TO_PROCESS','Notify fund owner', 'A suggestion is ready to be processed','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nA new suggestion is ready to be processed: <<suggestions.title>> by <<suggestions.author>>.\n\nThank you,\n\n<<branches.branchname>>', 'email'), >-('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'); >+('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n <<borrowers.firstname>> <<borrowers.surname>>\r\n Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.', 'email'), >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pendin g approval</h3> >diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >index b270eb0f70..0992141933 100644 >--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >@@ -81,7 +81,9 @@ INSERT INTO `letter` (module, code, name, title, content, message_transport_type > > ('suggestions','TO_PROCESS','УвÑÐ´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ ÑондоÑÑимаÑа', 'ÐÑопозиÑÑÑ Ð³Ð¾Ñова Ñо обÑобки', > 'ÐоÑог(ий/а) <<borrowers.firstname>> <<borrowers.surname>>,\n\n нова пÑопозиÑÑÑ Ð³Ð¾Ð¾Ñова до обÑобки: â<<suggestions.title>>â / <<suggestions.author>>.\n\n СпаÑибÑ,\n\n<<branches.branchname>>', >- 'email') >+ 'email'), >+ >+('members', 'PROBLEM_REPORT','OPAC Problem Report','OPAC Problem Report','Username: <<problem_reports.username>>\n\nProblem page: <<problem_reports.problempage>>\n\nTitle: <<problem_reports.title>>\n\nMessage: <<problem_reports.content>>','email') > ; > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt >index 102f63cf58..965fefd0de 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt >@@ -1,6 +1,6 @@ > [% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Report a Problem</title> >+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Report a problem</title> > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > </head> >@@ -28,7 +28,7 @@ > <h1>Report a problem</h1> > > [% IF ( successfuladd ) %] >- <div class="alert alert-info">Your problem report has been sent to the [% IF ( recipient == 'admin' ) %]Koha Administrator[% ELSE %][% recipient %][% END %].</div> >+ <div class="alert alert-info">Your problem report has been sent to the [% IF ( recipient == 'admin' ) %]Koha Administrator[% ELSE %][% recipient | html %][% END %].</div> > [% END %] > [% IF ( ( nolibemail and noadminemail ) or norecipients ) %] > <div class="alert">Unable to send problem reports.</div> >@@ -53,16 +53,16 @@ > </li> > <li> > <label for="place">Problem found on page: </label> >- <input type="hidden" name="place" id="place" value="[% probpage %]"> >+ <input type="hidden" name="place" id="place" value="[% probpage | html %]"> > [% probpage | html %] > </li> > <li> > <label for="user">Username: </label> >- <input type="hidden" name="user" id="user" value="[% username %]" class="span3"> >+ <input type="hidden" name="user" id="user" value="[% username | html %]" class="span3"> > [% username | html %] > <li> > <label for="subject">Subject: </label> >- <input type="text" name="subject" id="subject" value="[% subject %]" class="span3"> >+ <input type="text" name="subject" id="subject" value="[% subject | html %]" class="span3"> > </li> > <li> > <label for="message">Message: </label> >diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl >index 7660e6c5eb..7cc261d7ca 100644 >--- a/opac/opac-reportproblem.pl >+++ b/opac/opac-reportproblem.pl >@@ -89,17 +89,22 @@ if ( $op eq 'addreport' ) { > probpage => $place, > ); > >- my $problemreport = $problem->unblessed; >- $problemreport->{code} = 'PROBLEM_REPORT'; >- $problemreport->{content} .= "\nUsername: $username"; >- $problemreport->{content} .= "\nProblem page: $place"; >- my $transport = 'email'; >+ # send notice to library >+ my $letter = C4::Letters::GetPreparedLetter( >+ module => 'members', >+ letter_code => 'PROBLEM_REPORT', >+ branchcode => $problem->branchcode, >+ tables => { >+ 'problem_reports', $problem->reportid >+ } >+ ); > > my $from_address = $member->email || $member->emailpro || $member->B_email || $koha_admin; >+ my $transport = 'email'; > > if ( $recipient eq 'admin' ) { > C4::Letters::EnqueueLetter({ >- letter => $problemreport, >+ letter => $letter, > borrowernumber => $borrowernumber, > message_transport_type => $transport, > to_address => $koha_admin, >@@ -110,7 +115,7 @@ if ( $op eq 'addreport' ) { > C4::Context->preference('ReplytoDefault') || > $library->branchemail; > C4::Letters::EnqueueLetter({ >- letter => $problemreport, >+ letter => $letter, > borrowernumber => $borrowernumber, > message_transport_type => $transport, > to_address => $to_address, >diff --git a/tools/letter.pl b/tools/letter.pl >index c658dbfbf9..6044243c09 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -261,6 +261,10 @@ sub add_form { > if ( $module eq 'circulation' and $code and $code =~ /^AR_/ ) { > push @{$field_selection}, add_fields('article_requests'); > } >+ >+ if ( $module eq 'members' and $code and $code eq 'PROBLEM_REPORT' ) { >+ push @{$field_selection}, add_fields('problem_reports'); >+ } > } > > my $preview_is_available = 0; >-- >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 4461
:
58887
|
59032
|
61654
|
65871
|
66253
|
66323
|
66324
|
98687
|
98688
|
98689
|
98725
|
99551
|
99599
|
99600
|
99601
|
99602
|
99603
|
99633
|
99635
|
99636
|
99637
|
99638
|
99639
|
99929
|
99930
|
99931
|
99932
|
99933
|
99934
|
99935
|
99936
|
99937
|
99938
|
99939
|
99940
|
99941
|
99942
|
100488
|
100489
|
100490
|
100491
|
100492
|
100493
|
100494
|
100495
|
100496
|
100497
|
100498
|
100499
|
100500
|
100506
|
100507
|
100508
|
100509
|
100510
|
100511
|
100512
|
100513
|
100514
|
100515
|
100516
|
100517
|
100518
|
100519
|
100520
|
100521
|
100522
|
100523
|
100524
|
100619
|
100989
|
100990
|
102188
|
102189
|
102190
|
102191
|
102192
|
102193
|
102194
|
102195
|
102196
|
102198
|
102200
|
102201
|
102202
|
102203
|
102204
|
102205
|
102206
|
102207
|
102208
|
102209
|
102210
|
102211
|
102253
|
102279
|
102281
|
102308
|
102309
|
102310
|
102311
|
102312
|
102313
|
102314
|
102315
|
102316
|
102317
|
102318
|
102319
|
102320
|
102321
|
102322
|
102323
|
102324
|
102325
|
102326
|
102327
|
102328
|
102329
|
102330
|
102331
|
102358
|
102359
|
102360
|
102361
|
102362
|
102363
|
102364
|
102365
|
102366
|
102367
|
102368
|
102369
|
102370
|
102371
|
102372
|
102373
|
102374
|
102375
|
102376
|
102377
|
102378
|
102379
|
102380
|
102381
|
102382
|
102383
|
102384
|
102385
|
102386