From 5833eb61642cce366fc1910d713cf4eebfc2b2a3 Mon Sep 17 00:00:00 2001
From: Lari Taskula <lari.taskula@hypernova.fi>
Date: Tue, 31 Mar 2020 16:27:39 +0000
Subject: [PATCH] Bug 25089: Sort circulation rules

Sponsored-by: The National Library of Finland
---
 Koha/CirculationRules.pm | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm
index c267930bda..546d72fa56 100644
--- a/Koha/CirculationRules.pm
+++ b/Koha/CirculationRules.pm
@@ -50,9 +50,6 @@ our $RULE_KINDS = {
         scope => [ 'branchcode' ],
     },
 
-    patron_maxissueqty => {
-        scope => [ 'branchcode', 'categorycode', 'checkout_type' ],
-    },
     max_holds => {
         scope => [ 'branchcode', 'categorycode' ],
     },
@@ -67,9 +64,29 @@ our $RULE_KINDS = {
         scope => [ 'branchcode', 'itemtype' ],
     },
 
+    patron_maxissueqty => {
+        scope => [ 'branchcode', 'categorycode', 'checkout_type' ],
+    },
+
     article_requests => {
         scope => [ 'branchcode', 'categorycode', 'itemtype' ],
     },
+    holds_per_day => {
+        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+    },
+    holds_per_record => {
+        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+    },
+    onshelfholds => {
+        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+    },
+    opacitemholds => {
+        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+    },
+    reservesallowed => {
+        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+    },
+
     auto_renew => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
@@ -97,12 +114,6 @@ our $RULE_KINDS = {
     hardduedatecompare => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
-    holds_per_day => {
-        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
-    },
-    holds_per_record => {
-        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
-    },
     issuelength => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
@@ -124,12 +135,6 @@ our $RULE_KINDS = {
     norenewalbefore => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
-    onshelfholds => {
-        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
-    },
-    opacitemholds => {
-        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
-    },
     overduefinescap => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
@@ -142,9 +147,6 @@ our $RULE_KINDS = {
     rentaldiscount => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
-    reservesallowed => {
-        scope => [ 'branchcode', 'categorycode', 'itemtype' ],
-    },
     suspension_chargeperiod => {
         scope => [ 'branchcode', 'categorycode', 'itemtype', 'checkout_type' ],
     },
-- 
2.17.1