From d918df0ef5099d3a616f5c236d353ed98e768242 Mon Sep 17 00:00:00 2001 From: Arlen Johnson <arlen@sphericalcowgroup.com> Date: Fri, 5 May 2023 07:28:35 -0400 Subject: [PATCH] Provide sorting for attributes and crosscheckAttributes select fields (CO-2629) (#63) * Provide sorting for attributes and crosscheckAttributes select fields (CO-2629) * Ensure sort order is provided (CO-2629) --- app/src/Model/Table/AttributesTable.php | 6 ++++-- app/src/Model/Table/RuleAttributesTable.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/Model/Table/AttributesTable.php b/app/src/Model/Table/AttributesTable.php index 37507df61..57b5dd44c 100644 --- a/app/src/Model/Table/AttributesTable.php +++ b/app/src/Model/Table/AttributesTable.php @@ -68,12 +68,14 @@ public function initialize(array $config): void { 'attributeGroups' => [ 'type' => 'select', 'model' => 'AttributeGroups', - 'find' => 'filterPrimaryLink' + 'find' => 'filterPrimaryLink', + 'order' => ['name' => 'ASC'] ], 'attributeMaps' => [ 'type' => 'select', 'model' => 'AttributeMaps', - 'find' => 'filterPrimaryLink' + 'find' => 'filterPrimaryLink', + 'order' => ['name' => 'ASC'] ] ]); } diff --git a/app/src/Model/Table/RuleAttributesTable.php b/app/src/Model/Table/RuleAttributesTable.php index 68dee6601..03c6f8284 100644 --- a/app/src/Model/Table/RuleAttributesTable.php +++ b/app/src/Model/Table/RuleAttributesTable.php @@ -70,12 +70,14 @@ public function initialize(array $config): void { 'attributes' => [ 'type' => 'select', 'model' => 'Attributes', - 'find' => 'filterMatchgrid' + 'find' => 'filterMatchgrid', + 'order' => ['name' => 'ASC'] ], 'crosscheckAttributes' => [ 'type' => 'select', 'model' => 'Attributes', - 'find' => 'filterMatchgrid' + 'find' => 'filterMatchgrid', + 'order' => ['name' => 'ASC'] ], 'searchTypes' => [ 'type' => 'enum',