From 39d3b32dbc4fabb0e2413637f27b50c376aa69d2 Mon Sep 17 00:00:00 2001 From: Aidan Saunders Date: Tue, 31 May 2022 15:20:33 +0100 Subject: [PATCH] Make CaseType usable in Afform --- CRM/Case/DAO/CaseType.php | 20 +++++++++++++++++++- Civi/Api4/CaseType.php | 2 +- xml/schema/Case/CaseType.xml | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/CRM/Case/DAO/CaseType.php b/CRM/Case/DAO/CaseType.php index 3fbe29126dbb..53b1a88e0b34 100644 --- a/CRM/Case/DAO/CaseType.php +++ b/CRM/Case/DAO/CaseType.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Case/CaseType.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:7b3029a4b42f22a060fadb39b7b2c678) + * (GenCodeChecksum:92eb680369ce37591734a961f22ce831) */ /** @@ -159,6 +159,9 @@ public static function &fields() { 'entity' => 'CaseType', 'bao' => 'CRM_Case_BAO_CaseType', 'localizable' => 0, + 'html' => [ + 'type' => 'Text', + ], 'add' => '4.5', ], 'title' => [ @@ -174,6 +177,9 @@ public static function &fields() { 'entity' => 'CaseType', 'bao' => 'CRM_Case_BAO_CaseType', 'localizable' => 1, + 'html' => [ + 'type' => 'Text', + ], 'add' => '4.5', ], 'description' => [ @@ -188,6 +194,9 @@ public static function &fields() { 'entity' => 'CaseType', 'bao' => 'CRM_Case_BAO_CaseType', 'localizable' => 1, + 'html' => [ + 'type' => 'Text', + ], 'add' => '4.5', ], 'is_active' => [ @@ -202,6 +211,9 @@ public static function &fields() { 'entity' => 'CaseType', 'bao' => 'CRM_Case_BAO_CaseType', 'localizable' => 0, + 'html' => [ + 'type' => 'CheckBox', + ], 'add' => '4.5', ], 'is_reserved' => [ @@ -216,6 +228,9 @@ public static function &fields() { 'entity' => 'CaseType', 'bao' => 'CRM_Case_BAO_CaseType', 'localizable' => 0, + 'html' => [ + 'type' => 'CheckBox', + ], 'add' => '4.5', ], 'weight' => [ @@ -230,6 +245,9 @@ public static function &fields() { 'entity' => 'CaseType', 'bao' => 'CRM_Case_BAO_CaseType', 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + ], 'add' => '4.5', ], 'definition' => [ diff --git a/Civi/Api4/CaseType.php b/Civi/Api4/CaseType.php index 618454281c9b..29b41829f374 100644 --- a/Civi/Api4/CaseType.php +++ b/Civi/Api4/CaseType.php @@ -16,7 +16,7 @@ * This contains configuration settings for each type of CiviCase. * * @see \Civi\Api4\Case - * @searchable none + * @searchable secondary * @since 5.37 * @package Civi\Api4 */ diff --git a/xml/schema/Case/CaseType.xml b/xml/schema/Case/CaseType.xml index 3c8a18ff5559..c6b9c3ef9160 100644 --- a/xml/schema/Case/CaseType.xml +++ b/xml/schema/Case/CaseType.xml @@ -29,6 +29,9 @@ 64 true Machine name for Case Type + + Text + 4.5 @@ -45,6 +48,9 @@ true true Natural language name for Case Type + + Text + 4.5 @@ -54,6 +60,9 @@ 255 true Description of the Case Type + + Text + 4.5 @@ -61,6 +70,9 @@ Case Type Is Active boolean Is this case type enabled? + + CheckBox + 1 true 4.5 @@ -72,6 +84,9 @@ 0 true Is this case type a predefined system type? + + CheckBox + 4.5 @@ -81,6 +96,9 @@ true 1 Ordering of the case types + + Number + 4.5