From ea8cd631dc97374f468169539cf67ca26b8a4f12 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Mon, 20 Apr 2020 12:16:34 +0000 Subject: [PATCH] Bug 25089: Change sorting order to branchcode, checkout_type, categorycode, itemtype Otherwise we need to set renewalsallowed=0 for every rule if we don't want on-site checkouts to be renewalable. To test: 1. prove t/db_dependent/Koha/CirculationRules.t --- Koha/CirculationRules.pm | 2 +- .../prog/en/modules/admin/smart-rules.tt | 46 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index 546d72fa56..7a951a84c8 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -190,7 +190,7 @@ sub get_effective_rule { } my $order_by = $params->{order_by} - // { -desc => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ] }; + // { -desc => [ 'branchcode', 'checkout_type', 'categorycode', 'itemtype', ] }; my $search_params; $search_params->{rule_name} = $rule_name; 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 fadf6c91a9..389fddae0e 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 @@ -93,9 +93,9 @@ + - @@ -129,11 +129,11 @@ [% SET row_count = 0 %] - [% FOREACH c IN categorycodes %] - [% SET c = '' UNLESS c.defined %] - [% FOREACH i IN itemtypes %] + [% FOREACH ct IN checkout_types %] + [% FOREACH c IN categorycodes %] + [% SET c = '' UNLESS c.defined %] + [% FOREACH i IN itemtypes %] [% SET i = '' UNLESS i.defined %] - [% FOREACH ct IN checkout_types %] [% SET ct = '' UNLESS ct.defined %] [% SET note = all_rules.$c.$i.$ct.note %] [% SET maxissueqty = all_rules.$c.$i.$ct.maxissueqty %] @@ -168,28 +168,28 @@ [% SET row_count = row_count + 1 %] + - + - -- 2.17.1
Checkout type Patron category Item typeCheckout type Actions Note Current checkouts allowed
- [% IF c == undef %] + [% IF ct == undef %] All [% ELSE %] - [% Categories.GetName(c) | html %] + [% IF ct == 'CHECKOUT' %] + Normal checkout + [% ELSIF ct == 'ONSITE' %] + On-site checkout + [% END %] [% END %] - [% IF i == undef %] + [% IF c == undef %] All [% ELSE %] - [% ItemTypes.GetDescription(i) | html %] + [% Categories.GetName(c) | html %] [% END %] - [% IF ct == undef %] + [% IF i == undef %] All [% ELSE %] - [% IF ct == 'CHECKOUT' %] - Normal checkout - [% ELSIF ct == 'ONSITE' %] - On-site checkout - [% END %] + [% ItemTypes.GetDescription(i) | html %] [% END %] @@ -322,6 +322,13 @@ [% END %] [% END %]
+ + - - @@ -430,9 +430,9 @@
Checkout type Patron category Item typeCheckout type   Note Current checkouts allowed