Bugzilla – Attachment 50733 Details for
Bug 15705
Notify the user on auto renewing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Bug-15705-DB-Changes---Add-oldissuesautorenewerror.patch (text/plain), 5.70 KB, created by
Jonathan Druart
on 2016-04-26 16:51:41 UTC
(
hide
)
Description:
Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-04-26 16:51:41 UTC
Size:
5.70 KB
patch
obsolete
>From d215de9b75c12da887c69af9d10564ce71e1b8ee Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 29 Jan 2016 17:13:17 +0000 >Subject: [PATCH] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and > the AUTO_RENEWALS notice > >--- > Koha/Schema/Result/Issue.pm | 8 ++++---- > Koha/Schema/Result/OldIssue.pm | 12 ++++++++++-- > installer/data/mysql/atomicupdate/bug_XXXXX.sql | 23 +++++++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 4 files changed, 39 insertions(+), 6 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_XXXXX.sql > >diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm >index 5cc4786..60fd1f2 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -86,7 +86,7 @@ __PACKAGE__->table("issues"); > > data_type: 'varchar' > is_nullable: 1 >- size: 16 >+ size: 32 > > =head2 timestamp > >@@ -143,7 +143,7 @@ __PACKAGE__->add_columns( > "auto_renew", > { data_type => "tinyint", default_value => 0, is_nullable => 1 }, > "auto_renew_error", >- { data_type => "varchar", is_nullable => 1, size => 16 }, >+ { data_type => "varchar", is_nullable => 1, size => 32 }, > "timestamp", > { > data_type => "timestamp", >@@ -230,8 +230,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-29 15:31:46 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/T5nt8qhlT6ocUG6A9JNIw >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-26 17:45:37 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KbaJdrP97aSR5zgr/Z1V1w > > __PACKAGE__->belongs_to( > "borrower", >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index 6daaa40..f53eb0d 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -81,6 +81,12 @@ __PACKAGE__->table("old_issues"); > default_value: 0 > is_nullable: 1 > >+=head2 auto_renew_error >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 32 >+ > =head2 timestamp > > data_type: 'timestamp' >@@ -135,6 +141,8 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", is_nullable => 1 }, > "auto_renew", > { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >+ "auto_renew_error", >+ { data_type => "varchar", is_nullable => 1, size => 32 }, > "timestamp", > { > data_type => "timestamp", >@@ -207,8 +215,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-04-23 13:04:51 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9GdzytyInRcFZns/q0qb3Q >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-26 17:45:37 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:st1nw6s5av9YpGu5WndwFw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/installer/data/mysql/atomicupdate/bug_XXXXX.sql b/installer/data/mysql/atomicupdate/bug_XXXXX.sql >new file mode 100644 >index 0000000..f98566c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_XXXXX.sql >@@ -0,0 +1,23 @@ >+ALTER TABLE issues ADD COLUMN auto_renew_error VARCHAR(16) DEFAULT NULL AFTER auto_renew; >+ALTER TABLE old_issues ADD COLUMN auto_renew_error VARCHAR(16) DEFAULT NULL AFTER auto_renew; >+ >+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'notification on auto renewing', 'Auto renewals', >+"Dear [% borrower.firstname %] [% borrower.surname %], >+[% IF checkout.auto_renew_error %] >+The following item [% biblio.title %] has not been correctly renewed >+[% IF checkout.auto_renew_error == 'too_many' %] >+You have reach 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 overdues. >+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] >+It\'s too late to renew this checkout. >+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] >+You have too much unpaid fines. >+[% END %] >+[% ELSE %] >+The following item [% biblio.title %] as correctly been renewed. >+[% END %]", 'email'); >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index b2b7987..bd0878f 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1164,6 +1164,7 @@ CREATE TABLE `issues` ( -- information related to check outs or issues > `return` varchar(4) default NULL, > `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed > `auto_renew` BOOLEAN default FALSE, -- automatic renewal >+ `auto_renew_error` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, -- automatic renewal error > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched > `issuedate` datetime default NULL, -- date the item was checked out or issued > `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag >@@ -1667,6 +1668,7 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r > `return` varchar(4) default NULL, > `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed > `auto_renew` BOOLEAN default FALSE, -- automatic renewal >+ `auto_renew_error` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, -- automatic renewal error > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched > `issuedate` datetime default NULL, -- date the item was checked out or issued > `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag >-- >2.7.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 15705
:
47470
|
47471
|
47472
|
50336
|
50337
|
50338
|
50341
|
50342
|
50344
|
50345
|
50346
|
50680
|
50681
|
50682
|
50683
|
50732
|
50733
|
56756
|
56757
|
56758
|
56759
|
56760
|
56798
|
56799
|
56981
|
56983
|
57741
|
57742
|
57743
|
57744
|
57745
|
57746
|
57747
|
61080
|
61081
|
61082
|
61083
|
61084
|
61085
|
61086
|
61495
|
61496
|
61497
|
61498
|
61499
|
61500
|
61501
|
61739
|
62072
|
63036
|
63037
|
63138
|
63139
|
63140
|
63141
|
63142
|
63143
|
63144