Bugzilla – Attachment 25855 Details for
Bug 7413
Allow OPAC renewal x days before due date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 7413: Add issuingrules.norenewalbefore to database
SIGNED-OFF-Bug-7413-Add-issuingrulesnorenewalbefor.patch (text/plain), 2.69 KB, created by
Martin Renvoize (ashimema)
on 2014-03-05 15:09:08 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 7413: Add issuingrules.norenewalbefore to database
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-03-05 15:09:08 UTC
Size:
2.69 KB
patch
obsolete
>From 68a668fc69f46ca58e0f7a3cb3c33ffd2a6d94b4 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Holger=20Mei=C3=9Fner?= <h.meissner.82@web.de> >Date: Wed, 12 Feb 2014 16:53:06 +0100 >Subject: [PATCH] [SIGNED OFF] Bug 7413: Add issuingrules.norenewalbefore to > database >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Currently multiple renewals can be done in immediate succsession. >To optionally prevent this, a new parameter "No renewal before" >is introduced. > >This patch adds issuingrules.norenewalbefore to the database. >Default value is NULL. > >To test: >1) Run installer/data/mysql/updatedatabase.pl >2) Create a SQL report like: > SELECT * FROM issuingrules >3) Confirm that norenewalbefore was added after renewalperiod. > >Sponsored-by: Hochschule für Gesundheit (hsg), Germany >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 9 +++++++++ > 2 files changed, 10 insertions(+) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index dddd2c0..b54b5b5 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1155,6 +1155,7 @@ CREATE TABLE `issuingrules` ( -- circulation and fine rules > `hardduedatecompare` tinyint NOT NULL default "0", -- type of hard due date (1 = after, 0 = on, -1 = before) > `renewalsallowed` smallint(6) NOT NULL default "0", -- how many renewals are allowed > `renewalperiod` int(4) default NULL, -- renewal period in the unit set in issuingrules.lengthunit >+ `norenewalbefore` int(4) default NULL, -- no renewal allowed until X days or hours before due date. In the unit set in issuingrules.lengthunit > `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed > `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode) > overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index c8e883f..6c60044 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8012,6 +8012,15 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if(CheckVersion($DBversion)) { >+ $dbh->do(q{ >+ ALTER TABLE issuingrules ADD norenewalbefore int(4) default NULL AFTER renewalperiod >+ }); >+ print "Upgrade to $DBversion done (Bug 7413: Allow OPAC renewal x days before due date)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.10.4
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 7413
:
24685
|
24686
|
24687
|
24688
|
24689
|
24926
|
24927
|
24928
|
24929
|
24930
|
25166
|
25247
|
25248
|
25249
|
25250
|
25251
|
25252
|
25855
|
25856
|
25857
|
25858
|
25859
|
25860
|
26726
|
26727
|
26728
|
26729
|
26730
|
26731
|
26732
|
26733