Bugzilla – Attachment 100486 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 to sample_notices
Bug-23787-add-AUTORENEWALS-to-samplenotices.patch (text/plain), 4.19 KB, created by
Andrew Fuerste-Henry
on 2020-03-11 00:46:26 UTC
(
hide
)
Description:
Bug 23787: add AUTO_RENEWALS to sample_notices
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-03-11 00:46:26 UTC
Size:
4.19 KB
patch
obsolete
>From d27f32af4a1b02a22d9452145c837b0588b5daaa Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Date: Wed, 11 Mar 2020 00:43:20 +0000 >Subject: [PATCH] Bug 23787: add AUTO_RENEWALS to sample_notices > >To test: >- create a new install >- confirm presence of auto renewal notice >--- > .../data/mysql/atomicupdate/add_auto_renewals.perl | 35 ++++++++++++++++++++++ > .../data/mysql/en/mandatory/sample_notices.yml | 31 +++++++++++++++++++ > 2 files changed, 66 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/add_auto_renewals.perl > >diff --git a/installer/data/mysql/atomicupdate/add_auto_renewals.perl b/installer/data/mysql/atomicupdate/add_auto_renewals.perl >new file mode 100644 >index 0000000000..f9a16bba7c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/add_auto_renewals.perl >@@ -0,0 +1,35 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ $dbh->do( q{ >+ 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 number 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 to sample_notices)\n"; >+} >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index a2b7dec89b..24f09fe6b8 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -1145,3 +1145,34 @@ tables: > - "Thank you," > - "" > - "<<branches.branchname>>" >+ >+ - module: circulation >+ code: AUTO_RENEWALS >+ branchcode: "" >+ name: "Notification of automatic renewal" >+ is_html: 0 >+ title: "Automatic renewal notice" >+ message_transport_type: email >+ lang: default >+ content: >+ - "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 number 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 %]" >+ >+ >-- >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