Bugzilla – Attachment 42826 Details for
Bug 14610
Add ability to place article requests in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14610 - Update circ rules
Bug-14610---Update-circ-rules.patch (text/plain), 6.81 KB, created by
Kyle M Hall (khall)
on 2015-09-23 17:00:57 UTC
(
hide
)
Description:
Bug 14610 - Update circ rules
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-09-23 17:00:57 UTC
Size:
6.81 KB
patch
obsolete
>From 2e9abd8a52647479bfeaa9c5202c5be693d00c82 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 28 Jul 2015 11:39:03 -0400 >Subject: [PATCH] Bug 14610 - Update circ rules > >--- > Koha/Schema/Result/Issuingrule.pm | 18 +++++++++++++++- > admin/smart-rules.pl | 2 + > installer/data/mysql/atomicupdate/bug_14610.sql | 2 + > .../prog/en/modules/admin/smart-rules.tt | 21 ++++++++++++++++++++ > 4 files changed, 41 insertions(+), 2 deletions(-) > >diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm >index 438c23b..d8b4111 100644 >--- a/Koha/Schema/Result/Issuingrule.pm >+++ b/Koha/Schema/Result/Issuingrule.pm >@@ -174,6 +174,13 @@ __PACKAGE__->table("issuingrules"); > is_nullable: 0 > size: 1 > >+=head2 article_requests >+ >+ data_type: 'enum' >+ default_value: 'no' >+ extra: {list => ["no","yes","bib_only","item_only"]} >+ is_nullable: 0 >+ > =cut > > __PACKAGE__->add_columns( >@@ -234,6 +241,13 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > "opacitemholds", > { data_type => "char", default_value => "N", is_nullable => 0, size => 1 }, >+ "article_requests", >+ { >+ data_type => "enum", >+ default_value => "no", >+ extra => { list => ["no", "yes", "bib_only", "item_only"] }, >+ is_nullable => 0, >+ }, > ); > > =head1 PRIMARY KEY >@@ -253,8 +267,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype"); > > >-# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-12-19 07:00:40 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CE8yuYC5QgPHI2GOjiT28w >+# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-07-28 11:06:46 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7NYRxVqqaOboCYmWvs1cyw > > > # 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 9ef6ef6..49fc2db 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -127,6 +127,7 @@ elsif ($op eq 'add') { > my $hardduedatecompare = $input->param('hardduedatecompare'); > my $rentaldiscount = $input->param('rentaldiscount'); > my $opacitemholds = $input->param('opacitemholds') || 0; >+ my $article_requests = $input->param('article_requests') || 'no'; > my $overduefinescap = $input->param('overduefinescap') || undef; > $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty"; > >@@ -155,6 +156,7 @@ elsif ($op eq 'add') { > rentaldiscount => $rentaldiscount, > onshelfholds => $onshelfholds, > opacitemholds => $opacitemholds, >+ article_requests => $article_requests, > overduefinescap => $overduefinescap, > }; > >diff --git a/installer/data/mysql/atomicupdate/bug_14610.sql b/installer/data/mysql/atomicupdate/bug_14610.sql >index ddfbd6a..0611768 100644 >--- a/installer/data/mysql/atomicupdate/bug_14610.sql >+++ b/installer/data/mysql/atomicupdate/bug_14610.sql >@@ -28,3 +28,5 @@ ALTER TABLE `article_requests` ADD FOREIGN KEY ( `biblionumber` ) REFERENCES > ALTER TABLE `article_requests` ADD FOREIGN KEY ( `itemnumber` ) REFERENCES `koha_kohaqa`.`items` ( > `itemnumber` > ) ON DELETE SET NULL ON UPDATE CASCADE ; >+ >+ALTER TABLE `issuingrules` ADD `article_requests` ENUM( 'no', 'yes', 'bib_only', 'item_only' ) NOT NULL DEFAULT 'no'; >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 84ffcd8..3e234fc 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>Holds allowed (count)</th> > <th>On shelf holds allowed</th> > <th>Item level holds</th> >+ <th>Article requests</th> > <th>Rental discount (%)</th> > <th colspan="2"> </th> > </tr> >@@ -222,6 +223,17 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td>[% rule.reservesallowed %]</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> >+ [% IF rule.article_requests == 'no' %] >+ No >+ [% ELSIF rule.article_requests == 'yes' %] >+ Yes >+ [% ELSIF rule.article_requests == 'bib_only' %] >+ Record only >+ [% ELSIF rule.article_requests == 'item_only' %] >+ Item only >+ [% END %] >+ </td> > <td>[% rule.rentaldiscount %]</td> > <td><a href="#" class="editrule">Edit</a></td> > <td> >@@ -292,6 +304,14 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <option value="F">Force</option> > </select> > </td> >+ <td> >+ <select id="article_requests" name="article_requests"> >+ <option value="no">No</option> >+ <option value="yes">Yes</option> >+ <option value="bib_only">Record only</option> >+ <option value="item_only">Item only</option> >+ </select> >+ </td> > <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td> > <td colspan="2"> > <input type="hidden" name="branch" value="[% current_branch %]"/> >@@ -320,6 +340,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <th>Holds allowed (count)</th> > <th>On shelf holds allowed</th> > <th>Item level holds</th> >+ <th>Article requests</th> > <th>Rental discount (%)</th> > <th colspan="2"> </th> > </tr> >-- >1.7.2.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 14610
:
42822
|
42823
|
42824
|
42825
|
42826
|
42827
|
42828
|
42829
|
43198
|
43199
|
43200
|
43201
|
43202
|
43264
|
43265
|
43266
|
43267
|
43268
|
43270
|
43271
|
43272
|
43273
|
43274
|
43278
|
43279
|
43280
|
43281
|
43282
|
43654
|
43655
|
43656
|
43657
|
43658
|
44219
|
44220
|
44221
|
44222
|
44223
|
44224
|
44225
|
44226
|
44227
|
44228
|
44229
|
44230
|
44231
|
44232
|
44233
|
44234
|
44235
|
44236
|
44237
|
44238
|
44239
|
44240
|
44241
|
44242
|
44916
|
44917
|
44918
|
44919
|
44920
|
44921
|
44922
|
44923
|
44924
|
44925
|
44926
|
45946
|
45947
|
45948
|
45949
|
45950
|
45951
|
45952
|
45953
|
45954
|
45955
|
45956
|
46518
|
46519
|
46520
|
46521
|
46522
|
46523
|
46524
|
46525
|
46526
|
46527
|
46528
|
46529
|
46530
|
46595
|
46596
|
46597
|
46598
|
46599
|
46600
|
46601
|
46602
|
46603
|
46604
|
46605
|
46606
|
46607
|
46608
|
46609
|
46610
|
46611
|
46612
|
47905
|
47906
|
47907
|
47908
|
47909
|
47910
|
47911
|
47912
|
47913
|
47914
|
47915
|
47916
|
47917
|
47918
|
47919
|
47920
|
47921
|
47922
|
48177
|
48178
|
48179
|
48180
|
48181
|
48182
|
48212
|
48213
|
48214
|
48215
|
48216
|
48217
|
48218
|
50348
|
50349
|
50350
|
50351
|
50352
|
50353
|
50354
|
51527
|
51528
|
51529
|
51530
|
51531
|
51532
|
51533
|
51534
|
51778
|
51779
|
51780
|
51781
|
51782
|
51783
|
52688
|
52689
|
52690
|
52691
|
52692
|
52693
|
55556
|
55557
|
55558
|
55559
|
55560
|
55561
|
55568
|
55569
|
56084
|
56085
|
56086
|
56087
|
56088
|
56089
|
56090
|
56318
|
56319
|
56320
|
56321
|
56322
|
56323
|
56324
|
56325
|
56326
|
56327
|
56328
|
56775
|
56776
|
56777
|
56778
|
56779
|
56780
|
56781
|
56782
|
56783
|
56784
|
56785
|
56816
|
56854
|
56855
|
56856
|
56857
|
56858
|
56859
|
56860
|
56861
|
56862
|
56863
|
56864
|
56865