Bugzilla – Attachment 4711 Details for
Bug 5788
Move ReservesMaxPickupDelay system preference to the Circulation Matrix.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-bug_5788-ReservesMaxPickupDelay-syspref-to-reservesm.patch (text/plain), 6.82 KB, created by
Srdjan Jankovic
on 2011-07-22 07:24:46 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2011-07-22 07:24:46 UTC
Size:
6.82 KB
patch
obsolete
>From 4b02a92820d7f15c4cc170f4a1d72353a92db5c5 Mon Sep 17 00:00:00 2001 >From: Srdjan Jankovic <srdjan@catalyst.net.nz> >Date: Fri, 22 Jul 2011 19:20:46 +1200 >Subject: [PATCH 1/1] bug_5788: ReservesMaxPickupDelay syspref to reservesmaxpickupdelay issue rule > >--- > admin/smart-rules.pl | 9 +++++---- > installer/data/mysql/updatedatabase.pl | 10 +++++++++- > .../prog/en/modules/admin/smart-rules.tt | 5 ++++- > 3 files changed, 18 insertions(+), 6 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index f290934..192f745 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -101,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { > # save the values entered > elsif ($op eq 'add') { > my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?"); >- my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); >- my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); >+ my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, fine, finedays, firstremind, chargeperiod,rentaldiscount, reservesmaxpickupdelay, rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); >+ my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, rentaldiscount=?, reservesmaxpickupdelay=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); > > my $br = $branch; # branch > my $bor = $input->param('categorycode'); # borrower category >@@ -121,14 +121,15 @@ elsif ($op eq 'add') { > $hardduedate = format_date_in_iso($hardduedate); > my $hardduedatecompare = $input->param('hardduedatecompare'); > my $rentaldiscount = $input->param('rentaldiscount'); >+ my $reservesmaxpickupdelay = $input->param('reservesmaxpickupdelay'); > $debug and warn "Adding $br, $bor, $cat, $fine, $maxissueqty"; > > $sth_search->execute($br,$bor,$cat); > my $res = $sth_search->fetchrow_hashref(); > if ($res->{total}) { >- $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $br,$bor,$cat); >+ $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$rentaldiscount, $reservesmaxpickupdelay, $rentaldiscount, $br,$bor,$cat); > } else { >- $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount); >+ $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$reservesmaxpickupdelay,$rentaldiscount); > } > } > elsif ($op eq "set-branch-defaults") { >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 9cbc8db..dbd2595 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -2093,7 +2093,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $dbh->do("UPDATE `systempreferences` SET options='10' WHERE variable='globalDueDate'"); > $dbh->do("UPDATE `systempreferences` SET type='Integer' WHERE variable='numSearchResults'"); > $dbh->do("UPDATE `systempreferences` SET type='Integer' WHERE variable='OPACnumSearchResults'"); >- $dbh->do("UPDATE `systempreferences` SET type='Integer' WHERE variable='ReservesMaxPickupDelay'"); > $dbh->do("UPDATE `systempreferences` SET type='Integer' WHERE variable='TransfersMaxDaysWarning'"); > $dbh->do("UPDATE `systempreferences` SET type='Integer' WHERE variable='StaticHoldsQueueWeight'"); > $dbh->do("UPDATE `systempreferences` SET type='Integer' WHERE variable='holdCancelLength'"); >@@ -4370,6 +4369,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = '3.05.00.XXX'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ print "Upgrade to $DBversion done (Bug 5788 ReservesMaxPickupDelay circulation rule)\n"; >+ >+ $dbh->do("ALTER TABLE issuingrules ADD reservesmaxpickupdelay INTEGER"); >+ >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 0edcece..5bda091 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -80,6 +80,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <th>Suspension in Days (day)</th> > <th>Renewals Allowed (count)</th> > <th>Holds Allowed (count)</th> >+ <th>Holds Max Pickup Delay (day)</th> > <th>Rental Discount (%)</th> > <th> </th> > </tr> >@@ -121,6 +122,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td>[% rule.finedays %]</td> > <td>[% rule.renewalsallowed %]</td> > <td>[% rule.reservesallowed %]</td> >+ <td>[% rule.reservesmaxpickupdelay %]</td> > <td>[% rule.rentaldiscount %]</td> > <td> > <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]">Delete</a> >@@ -175,7 +177,8 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td><input name="finedays" size="3" /> </td> > <td><input name="renewalsallowed" size="2" /></td> > <td><input name="reservesallowed" size="2" /></td> >- <td><input name="rentaldiscount" size="2" /></td> >+ <td><input name="reservesmaxpickupdelay" size="2" /></td> >+ <td><input name="rentaldiscount" size="2" /></td> > <td><input type="hidden" name="branch" value="[% current_branch %]"/><input type="submit" value="Add" class="submit" /></td> > </tr> > </table> >-- >1.6.5 >
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 5788
:
4711
|
4807
|
8551