Bugzilla – Attachment 100418 Details for
Bug 23787
Add AUTO_RENEWALS in sample_notices.sql
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23787: Add AUTO_RENEWALS in sample_notices.sql
Bug-23787-Add-AUTORENEWALS-in-samplenoticessql.patch (text/plain), 18.35 KB, created by
Andrew Fuerste-Henry
on 2020-03-10 01:42:36 UTC
(
hide
)
Description:
Bug 23787: Add AUTO_RENEWALS in sample_notices.sql
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-03-10 01:42:36 UTC
Size:
18.35 KB
patch
obsolete
>From d7a5579625123e7573b67b42de25d27f8fa2f240 Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Date: Tue, 10 Mar 2020 01:38:53 +0000 >Subject: [PATCH] Bug 23787: Add AUTO_RENEWALS in sample_notices.sql > >This patch adds the AUTO_RENEWALS notice SQL insert query that was only available in the updatedatabase script into all the language-specific sample_notices.sql files in the installer (de-DE, en, es-ES, fr-CA, fr-FR, it-IT, nb-NO, pl-PL, ru-RU, uk-UA). > >To test, make a fresh install in a language listed above, do NOT run updatedatabase, make sure the AUTO_RENEWALS is in the available notices. >--- > .../mysql/atomicupdate/auto_renewals_notice.perl | 33 ++++++++++++++++++++++ > .../data/mysql/de-DE/mandatory/sample_notices.sql | 21 ++++++++++++++ > .../data/mysql/en/mandatory/sample_notices.sql | 21 ++++++++++++++ > .../data/mysql/es-ES/mandatory/sample_notices.sql | 21 ++++++++++++++ > .../mysql/fr-CA/obligatoire/sample_notices.sql | 21 ++++++++++++++ > .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 21 ++++++++++++++ > installer/data/mysql/it-IT/necessari/notices.sql | 21 ++++++++++++++ > .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 21 ++++++++++++++ > .../data/mysql/pl-PL/mandatory/sample_notices.sql | 21 ++++++++++++++ > .../data/mysql/ru-RU/mandatory/sample_notices.sql | 21 ++++++++++++++ > .../data/mysql/uk-UA/mandatory/sample_notices.sql | 21 ++++++++++++++ > 11 files changed, 243 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/auto_renewals_notice.perl > >diff --git a/installer/data/mysql/atomicupdate/auto_renewals_notice.perl b/installer/data/mysql/atomicupdate/auto_renewals_notice.perl >new file mode 100644 >index 0000000000..4c1964ee69 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/auto_renewals_notice.perl >@@ -0,0 +1,33 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ $dbh->do( "INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email');" ); >+ >+ # or perform some test and warn >+ # if( !column_exists( 'biblio', 'biblionumber' ) ) { >+ # warn "There is something wrong"; >+ # } >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23787 - Add AUTO_RENEWALS in sample_notices.sql)\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..58703957e9 100644 >--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql >+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >@@ -384,3 +384,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql >index 1fea0039ad..177290c182 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.sql >+++ b/installer/data/mysql/en/mandatory/sample_notices.sql >@@ -382,3 +382,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >index 417cc64bca..8dfa59809f 100644 >--- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql >+++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >@@ -376,3 +376,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >index 0a8b2d2011..e9aa4e5996 100644 >--- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >@@ -264,3 +264,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >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..aa09a42191 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >@@ -377,3 +377,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql >index 5a5f04cacd..2530270779 100644 >--- a/installer/data/mysql/it-IT/necessari/notices.sql >+++ b/installer/data/mysql/it-IT/necessari/notices.sql >@@ -380,3 +380,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >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..2a8312af5e 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >@@ -396,3 +396,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >index e031600840..e90c0e70aa 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >@@ -374,3 +374,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >index 677ec827bd..07040becaf 100644 >--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >@@ -376,3 +376,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >index b270eb0f70..dfd44860ff 100644 >--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >@@ -465,3 +465,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item, [% biblio.title %], has not been renewed because: >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reached the maximum of checkouts possible. >+[% ELSIF checkout.auto_renew_error == 'on_reserve' %] >+This item is on hold for another patron. >+[% ELSIF checkout.auto_renew_error == 'restriction' %] >+You are currently restricted. >+[% ELSIF checkout.auto_renew_error == 'overdue' %] >+You have overdue items. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this item. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+Your total unpaid fines are too high. >+[% END %] >+[% ELSE %] >+The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] >+[% END %]", 'email'); >\ No newline at end of file >-- >2.11.0
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 23787
:
93937
|
94968
|
100418
|
100486
|
100526
|
102731
|
102829
|
102830
|
102831
|
102868
|
102869
|
103763
|
104385
|
104675
|
104676
|
104677