Bugzilla – Attachment 88942 Details for
Bug 22284
Add ability to define groups of locations for hold pickup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22284: New hold group options in smart-rules
Bug-22284-New-hold-group-options-in-smart-rules.patch (text/plain), 8.04 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-04-26 17:23:26 UTC
(
hide
)
Description:
Bug 22284: New hold group options in smart-rules
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-04-26 17:23:26 UTC
Size:
8.04 KB
patch
obsolete
>From f2e25f9e3b5acb80f969f49ee6d6fdc9602b1424 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Mon, 25 Mar 2019 00:43:05 -0300 >Subject: [PATCH] Bug 22284: New hold group options in smart-rules > >This patch adds new options for 'Default checkout, hold and return policy' >and 'Default holds policy by item type', both in 'Hold policy' and 'Hold >pickup library match' columns > >To test: >1) Go to 'Circulation and fines rules' in admin >2) Check that there are no options for hold group in 'Hold policy' and 'Hold >pickup library match' columns >3) Apply this patch >SUCCESS => in 'Hold policy' you should see 'From local hold group' option, and in >'Hold pickup library match' you should see "Item's hold group" >4) Select any of those options and save >SUCCESS => options should be selected when page reloads >5) Sign off > >Sponsored-by: VOKAL >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > admin/smart-rules.pl | 2 + > .../prog/en/modules/admin/smart-rules.tt | 39 ++++++++++++++++--- > 2 files changed, 35 insertions(+), 6 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 927533d14d..6af813c2fd 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -590,6 +590,7 @@ my @sorted_branch_item_rules = sort { lc $a->{translated_description} cmp lc $b- > foreach my $entry (@sorted_branch_item_rules) { > $entry->{holdallowed_any} = 1 if ( $entry->{holdallowed} == 2 ); > $entry->{holdallowed_same} = 1 if ( $entry->{holdallowed} == 1 ); >+ $entry->{holdallowed_group} = 1 if ( $entry->{holdallowed} == 3 ); > } > > $template->param(show_branch_cat_rule_form => 1); >@@ -617,6 +618,7 @@ if ($defaults) { > $template->param( default_holdallowed_none => 1 ) if ( $defaults->{holdallowed} == 0 ); > $template->param( default_holdallowed_same => 1 ) if ( $defaults->{holdallowed} == 1 ); > $template->param( default_holdallowed_any => 1 ) if ( $defaults->{holdallowed} == 2 ); >+ $template->param( default_holdallowed_group => 1 ) if ( $defaults->{holdallowed} == 3 ); > $template->param( default_hold_fulfillment_policy => $defaults->{hold_fulfillment_policy} ); > $template->param( default_maxissueqty => $defaults->{maxissueqty} ); > $template->param( default_maxonsiteissueqty => $defaults->{maxonsiteissueqty} ); >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 bca8b25940..5edb6cc416 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 >@@ -431,6 +431,13 @@ > [% END %] > From any library > </option> >+ [% IF ( default_holdallowed_group ) %] >+ <option value="3" selected="selected"> >+ [% ELSE %] >+ <option value="3"> >+ [% END %] >+ From local hold group >+ </option> > [% IF ( default_holdallowed_same ) %] > <option value="1" selected="selected"> > [% ELSE %] >@@ -459,6 +466,16 @@ > </option> > [% END %] > >+ [% IF default_hold_fulfillment_policy == 'holdgroup' %] >+ <option value="holdgroup" selected="selected"> >+ item's hold group >+ </option> >+ [% ELSE %] >+ <option value="holdgroup"> >+ item's hold group >+ </option> >+ [% END %] >+ > [% IF default_hold_fulfillment_policy == 'homebranch' %] > <option value="homebranch" selected="selected"> > item's home library >@@ -515,7 +532,7 @@ > </div> > [% IF ( show_branch_cat_rule_form ) %] > <div id="holds-policy-by-patron-category" class="container"> >- <h3>[% IF humanbranch %]Checkout, hold policy by patron category for [% Branches.GetName( humanbranch ) | html %][% ELSE %]Default checkout, hold policy by patron category[% END %]</h3> >+ <h3>[% IF humanbranch %]Checkout, hold policy by patron category for [% Branches.GetName( humanbranch ) | html %][% ELSE %]Default checkout, hold policy by patron category[% END %]</h3> > <p>For this library, you can specify the maximum number of loans that > a patron of a given category can make, regardless of the item type. > </p> >@@ -594,11 +611,11 @@ > [% END %] > > <div id="refund-lost-item-fee-on-return" class="container"> >- [% IF current_branch == '*' %] >- <h3>Default lost item fee refund on return policy</h3> >- [% ELSE %] >- <h3>Lost item fee refund on return policy for [% Branches.GetName(current_branch) | html %]</h3> >- [% END %] >+ [% IF current_branch == '*' %] >+ <h3>Default lost item fee refund on return policy</h3> >+ [% ELSE %] >+ <h3>Lost item fee refund on return policy for [% Branches.GetName(current_branch) | html %]</h3> >+ [% END %] > <p>Specify the default policy for lost item fees on return. > </p> > <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >@@ -684,6 +701,7 @@ > </p> > <ul> > <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li> >+ <li><strong>From local hold group:</strong> Only patrons from libraries in the same item's home library hold groups may put this book on hold.</li> > <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li> > <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li> > </ul> >@@ -716,6 +734,8 @@ > </td> > <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %] > <span>From any library</span> >+ [% ELSIF ( branch_item_rule_loo.holdallowed_group ) %] >+ <span>From local hold group</span> > [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %] > <span>From home library</span> > [% ELSE %] >@@ -724,6 +744,8 @@ > </td> > <td>[% IF ( branch_item_rule_loo.hold_fulfillment_policy == 'any' ) %] > <span>any library</span> >+ [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'holdgroup' ) %] >+ <span>item's hold group</span> > [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'homebranch' ) %] > <span>item's home library</span> > [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'holdingbranch' ) %] >@@ -756,6 +778,7 @@ > <td> > <select name="holdallowed"> > <option value="2">From any library</option> >+ <option value="3">From local hold group</option> > <option value="1">From home library</option> > <option value="0">No holds allowed</option> > </select> >@@ -766,6 +789,10 @@ > any library > </option> > >+ <option value="holdgroup"> >+ item's hold group >+ </option> >+ > <option value="homebranch"> > item's home library > </option> >-- >2.21.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 22284
:
88138
|
88139
|
88140
|
88141
|
88142
|
88143
|
88144
|
88145
|
88369
|
88561
|
88793
|
88794
|
88795
|
88796
|
88797
|
88798
|
88799
|
88800
|
88801
|
88802
|
88939
|
88940
|
88941
|
88942
|
88943
|
88944
|
88945
|
88946
|
88947
|
88948
|
88949
|
88955
|
88956
|
88957
|
88958
|
88959
|
88960
|
88961
|
88962
|
88963
|
88964
|
88965
|
89060
|
89061
|
89062
|
89063
|
89064
|
89065
|
89066
|
89067
|
89068
|
89069
|
89070
|
89071
|
89072
|
89073
|
89074
|
89075
|
89076
|
89077
|
89078
|
89079
|
89080
|
89081
|
89082
|
89083
|
89084
|
89085
|
89122
|
89123
|
89124
|
89125
|
89126
|
89127
|
89128
|
89129
|
89130
|
89131
|
89132
|
89133
|
89134
|
89135
|
89523
|
89836
|
89837
|
89838
|
89839
|
89840
|
89841
|
89842
|
89843
|
89844
|
89845
|
89846
|
89847
|
89848
|
89849
|
90133
|
90134
|
90197
|
90198
|
90199
|
90200
|
90201
|
90469
|
90525
|
91261
|
91262
|
91263
|
91264
|
91265
|
91266
|
91267
|
91268
|
91269
|
91270
|
91271
|
91272
|
91273
|
91274
|
91275
|
91276
|
91277
|
91278
|
91279
|
91280
|
91282
|
91701
|
91702
|
91703
|
91704
|
91705
|
91706
|
91707
|
91708
|
91709
|
91710
|
91711
|
91712
|
91713
|
91714
|
91715
|
91716
|
91717
|
91718
|
91719
|
91720
|
91721
|
91750
|
91751
|
91752
|
91753
|
91754
|
91755
|
91756
|
91757
|
91758
|
92554
|
92555
|
92556
|
92557
|
92558
|
92559
|
92560
|
92561
|
92562
|
92563
|
92564
|
92565
|
92566
|
92567
|
92568
|
92569
|
92570
|
92571
|
92572
|
92573
|
92574
|
92752
|
92753
|
92754
|
92755
|
92756
|
92757
|
92758
|
92759
|
92760
|
92761
|
92762
|
92763
|
92764
|
92849
|
92850
|
92851
|
92852
|
92853
|
92854
|
92855
|
92856
|
92857
|
92858
|
92859
|
92860
|
92861
|
94483
|
94484
|
94485
|
94486
|
94487
|
94488
|
94489
|
94490
|
94491
|
94492
|
94493
|
94494
|
94495
|
96437
|
96438
|
96439
|
96440
|
96441
|
96442
|
96443
|
96444
|
96445
|
96446
|
96447
|
96448
|
96449
|
96450
|
96544
|
96545
|
96546
|
96547
|
96548
|
96549
|
96550
|
96551
|
96552
|
96553
|
96554
|
96555
|
96556
|
96557
|
96558
|
115202