Bugzilla – Attachment 45059 Details for
Bug 14695
Add ability to place multiple item holds on a given record per patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14695 - Add new issuing rule
Bug-14695---Add-new-issuing-rule.patch (text/plain), 6.77 KB, created by
Kyle M Hall (khall)
on 2015-11-20 16:04:41 UTC
(
hide
)
Description:
Bug 14695 - Add new issuing rule
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-20 16:04:41 UTC
Size:
6.77 KB
patch
obsolete
>From e95b471396e3a8c5691ea647ce46510dea01b8b9 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 5 Oct 2015 09:12:59 -0400 >Subject: [PATCH] Bug 14695 - Add new issuing rule > >This patch fines a new issuing rule 'holds_per_record' which defines >the number of holds a given patron can place on a given record. The >default is 1 to retain Koha's current behavior as the default. >--- > Koha/Schema/Result/Issuingrule.pm | 12 ++++++++++-- > admin/smart-rules.pl | 2 ++ > installer/data/mysql/atomicupdate/bug_14695.sql | 1 + > installer/data/mysql/kohastructure.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 4 ++++ > 5 files changed, 18 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_14695.sql > >diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm >index ff1617b..c068eda 100644 >--- a/Koha/Schema/Result/Issuingrule.pm >+++ b/Koha/Schema/Result/Issuingrule.pm >@@ -159,6 +159,12 @@ __PACKAGE__->table("issuingrules"); > default_value: 0 > is_nullable: 0 > >+=head2 holds_per_record >+ >+ data_type: 'smallint' >+ default_value: 1 >+ is_nullable: 0 >+ > =head2 branchcode > > data_type: 'varchar' >@@ -241,6 +247,8 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", default_value => 0, is_nullable => 1 }, > "reservesallowed", > { data_type => "smallint", default_value => 0, is_nullable => 0 }, >+ "holds_per_record", >+ { data_type => "smallint", default_value => 1, is_nullable => 0 }, > "branchcode", > { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, > "overduefinescap", >@@ -268,8 +276,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype"); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-22 14:50:45 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jTYQaXLtBrSIGEqpFlgIfg >+# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-05 09:16:16 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5KeKXqpCaxR99RwWTEEHEQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 253b08a..c9978f2 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -120,6 +120,7 @@ elsif ($op eq 'add') { > $norenewalbefore = undef if $norenewalbefore =~ /^\s*$/; > my $auto_renew = $input->param('auto_renew') eq 'yes' ? 1 : 0; > my $reservesallowed = $input->param('reservesallowed'); >+ my $holds_per_record = $input->param('holds_per_record'); > my $onshelfholds = $input->param('onshelfholds') || 0; > $maxissueqty =~ s/\s//g; > $maxissueqty = undef if $maxissueqty !~ /^\d+/; >@@ -156,6 +157,7 @@ elsif ($op eq 'add') { > norenewalbefore => $norenewalbefore, > auto_renew => $auto_renew, > reservesallowed => $reservesallowed, >+ holds_per_record => $holds_per_record, > issuelength => $issuelength, > lengthunit => $lengthunit, > hardduedate => $hardduedate, >diff --git a/installer/data/mysql/atomicupdate/bug_14695.sql b/installer/data/mysql/atomicupdate/bug_14695.sql >new file mode 100644 >index 0000000..cee3561 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_14695.sql >@@ -0,0 +1 @@ >+ALTER TABLE `issuingrules` ADD `holds_per_record` SMALLINT( 6 ) NOT NULL DEFAULT '1' AFTER `reservesallowed`; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 146565c..031b198 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1187,6 +1187,7 @@ CREATE TABLE `issuingrules` ( -- circulation and fine rules > `norenewalbefore` int(4) default NULL, -- no renewal allowed until X days or hours before due date. In the unit set in issuingrules.lengthunit > `auto_renew` BOOLEAN default FALSE, -- automatic renewal > `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed >+ `holds_per_record` SMALLINT( 6 ) NOT NULL DEFAULT '1', -- how many holds are allowed for a single patron per record > `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 > onshelfholds tinyint(1) NOT NULL default 0, -- allow holds for items that are on shelf >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 b871463..3490a06 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 >@@ -158,6 +158,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <th>No renewal before</th> > <th>Automatic renewal</th> > <th>Holds allowed (count)</th> >+ <th>Holds per record (count)</th> > <th>On shelf holds allowed</th> > <th>Item level holds</th> > <th>Rental discount (%)</th> >@@ -229,6 +230,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > [% END %] > </td> > <td>[% rule.reservesallowed %]</td> >+ <td>[% rule.holds_per_record %]</td> > <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td> > <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td> > <td>[% rule.rentaldiscount %]</td> >@@ -295,6 +297,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > </select> > </td> > <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td> >+ <td><input type="text" name="holds_per_record" id="holds_per_record" size="2" /></td> > <td> > <select name="onshelfholds" id="onshelfholds"> > <option value="0" selected>No</option> >@@ -336,6 +339,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <th>No renewal before</th> > <th>Automatic renewal</th> > <th>Holds allowed (count)</th> >+ <th>Holds per record (count)</th> > <th>On shelf holds allowed</th> > <th>Item level holds</th> > <th>Rental discount (%)</th> >-- >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 14695
:
44143
|
44144
|
44145
|
45058
|
45059
|
45060
|
45061
|
45063
|
45064
|
46548
|
46549
|
46550
|
46551
|
46552
|
46553
|
46554
|
46555
|
46556
|
46557
|
46914
|
46915
|
46916
|
46917
|
46918
|
46919
|
46920
|
47183
|
47184
|
47185
|
47186
|
47187
|
47188
|
47189
|
47190
|
47191
|
47196
|
47227
|
47228
|
47229
|
47230
|
47231
|
47232
|
47233
|
47234
|
47355
|
47372
|
47606
|
47607
|
47608
|
47609
|
47610
|
47611
|
47612
|
47613
|
47614
|
47615
|
48792
|
48795
|
48796
|
48797
|
48798
|
48799
|
48800
|
48801
|
48802
|
48803
|
50056
|
50057
|
50058
|
50059
|
50060
|
50061
|
50062
|
50063
|
50064
|
50065
|
50327
|
50391
|
51006
|
51007
|
51008
|
51009
|
51010
|
51011
|
51012
|
51013
|
51014
|
51015
|
51016
|
51017
|
51027
|
51030
|
51031
|
51032
|
51033
|
51034
|
51035
|
51036
|
51037
|
51038
|
51039
|
51040
|
51041
|
51042
|
51277
|
51278
|
51279
|
51280
|
51281
|
51282
|
51283
|
51284
|
51285
|
51286
|
51287
|
51288
|
51289
|
52457
|
54546
|
54547
|
54548
|
54549
|
54550
|
54551
|
54552
|
54553
|
54554
|
54555
|
54556
|
54557
|
54558
|
54559
|
55114
|
55115
|
55116
|
55117
|
55118
|
55119
|
55120
|
55121
|
55122
|
55123
|
55124
|
55125
|
55126
|
55127
|
55128
|
55148
|
55149
|
55150
|
55151
|
55152
|
55153
|
55154
|
55155
|
55156
|
55157
|
55158
|
55159
|
55160
|
55161
|
55162
|
55163
|
55299
|
55332
|
55730
|
55731