From db80870ee8f3a234d4c373f5abe0680df0fe8888 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Fri, 31 Mar 2023 18:49:20 -0400 Subject: [PATCH 1/2] Provide sorting for attributes and crosscheckAttributes select fields (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..0160ce8d7 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' ], 'attributeMaps' => [ 'type' => 'select', 'model' => 'AttributeMaps', - 'find' => 'filterPrimaryLink' + 'find' => 'filterPrimaryLink', + 'order' => 'name' ] ]); } diff --git a/app/src/Model/Table/RuleAttributesTable.php b/app/src/Model/Table/RuleAttributesTable.php index 68dee6601..feaaa367d 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' ], 'crosscheckAttributes' => [ 'type' => 'select', 'model' => 'Attributes', - 'find' => 'filterMatchgrid' + 'find' => 'filterMatchgrid', + 'order' => 'name' ], 'searchTypes' => [ 'type' => 'enum', From 49636b9bb4323f1650d00a64010357915d71d7ad Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Fri, 31 Mar 2023 20:42:00 -0400 Subject: [PATCH 2/2] Ensure sort order is provided (CO-2629) --- app/src/Model/Table/AttributesTable.php | 4 ++-- app/src/Model/Table/RuleAttributesTable.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/Model/Table/AttributesTable.php b/app/src/Model/Table/AttributesTable.php index 0160ce8d7..57b5dd44c 100644 --- a/app/src/Model/Table/AttributesTable.php +++ b/app/src/Model/Table/AttributesTable.php @@ -69,13 +69,13 @@ public function initialize(array $config): void { 'type' => 'select', 'model' => 'AttributeGroups', 'find' => 'filterPrimaryLink', - 'order' => 'name' + 'order' => ['name' => 'ASC'] ], 'attributeMaps' => [ 'type' => 'select', 'model' => 'AttributeMaps', 'find' => 'filterPrimaryLink', - 'order' => 'name' + 'order' => ['name' => 'ASC'] ] ]); } diff --git a/app/src/Model/Table/RuleAttributesTable.php b/app/src/Model/Table/RuleAttributesTable.php index feaaa367d..03c6f8284 100644 --- a/app/src/Model/Table/RuleAttributesTable.php +++ b/app/src/Model/Table/RuleAttributesTable.php @@ -71,13 +71,13 @@ public function initialize(array $config): void { 'type' => 'select', 'model' => 'Attributes', 'find' => 'filterMatchgrid', - 'order' => 'name' + 'order' => ['name' => 'ASC'] ], 'crosscheckAttributes' => [ 'type' => 'select', 'model' => 'Attributes', 'find' => 'filterMatchgrid', - 'order' => 'name' + 'order' => ['name' => 'ASC'] ], 'searchTypes' => [ 'type' => 'enum',