From: Coleman Watts Date: Mon, 20 Dec 2021 05:54:52 +0000 (-0500) Subject: CustomGroup - Add pseudoconstant for extends column X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c9ac084f58f6af60932d10dd61ecc90bcb3db062;p=civicrm-core.git CustomGroup - Add pseudoconstant for extends column --- diff --git a/CRM/Core/DAO/CustomGroup.php b/CRM/Core/DAO/CustomGroup.php index 70015686b6..02989e424a 100644 --- a/CRM/Core/DAO/CustomGroup.php +++ b/CRM/Core/DAO/CustomGroup.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/CustomGroup.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:e06fe97917806daa0d337c43968ccf2b) + * (GenCodeChecksum:27a1b80ba9d2696e97dd1df33468caff) */ /** @@ -291,6 +291,9 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO { 'entity' => 'CustomGroup', 'bao' => 'CRM_Core_BAO_CustomGroup', 'localizable' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::customGroupExtends', + ], 'add' => '1.1', ], 'extends_entity_column_id' => [ diff --git a/tests/phpunit/api/v3/ACLCachingTest.php b/tests/phpunit/api/v3/ACLCachingTest.php index aada6e1356..367d5beec6 100644 --- a/tests/phpunit/api/v3/ACLCachingTest.php +++ b/tests/phpunit/api/v3/ACLCachingTest.php @@ -49,7 +49,7 @@ class api_v3_ACLCachingTest extends CiviUnitTestCase { $values = $this->callAPISuccess('custom_field', 'getoptions', ['field' => 'custom_group_id']); $this->assertTrue($values['count'] == 0); $this->CustomGroupCreate(['extends' => 'Activity']); - $groupCount = $this->callAPISuccess('custom_group', 'getcount', ['extends' => 'activity']); + $groupCount = $this->callAPISuccess('custom_group', 'getcount', ['extends' => 'Activity']); $this->assertEquals($groupCount, 1, 'one group should now exist'); $values = $this->callAPISuccess('custom_field', 'getoptions', ['field' => 'custom_group_id']); $this->assertEquals(1, $values['count'], 'check that cached value is not retained for custom_group_id'); diff --git a/xml/schema/Core/CustomGroup.xml b/xml/schema/Core/CustomGroup.xml index c3f52a8441..d65d9c1ee8 100644 --- a/xml/schema/Core/CustomGroup.xml +++ b/xml/schema/Core/CustomGroup.xml @@ -51,6 +51,9 @@ 'Contact' Type of object this group extends (can add other options later e.g. contact_address, etc.). 1.1 + + CRM_Core_SelectValues::customGroupExtends + extends_entity_column_id