Skip to content
Snippets Groups Projects
Commit 4080e473 authored by Allen Shaw's avatar Allen Shaw Committed by colemanw
Browse files

Added meta-data to XML schema for fields referencing 'activity_type' and...

Added meta-data to XML schema for fields referencing 'activity_type' and 'visibility' option_group values. CRM-12464

----------------------------------------
* CRM-12464: Search improvements in 4.4
  http://issues.civicrm.org/jira/browse/CRM-12464
parent 6676690f
Branches
Tags
No related merge requests found
......@@ -68,6 +68,42 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
* - max: integer (default = 10) maximum number of option values expected.
*/
$fields = array(
'CRM_Activity_DAO_Activity' => array(
array(
'fieldName' => 'activity_type_id',
'sample' => 'Text Message (SMS)',
'max' => 50,
),
array(
'fieldName' => 'status_id',
'sample' => 'Scheduled',
),
),
'CRM_Campaign_DAO_Survey' => array(
array(
'fieldName' => 'activity_type_id',
'sample' => 'Text Message (SMS)',
'max' => 50,
),
),
'CRM_Event_DAO_ParticipantStatusType' => array(
array(
'fieldName' => 'visibility_id',
'sample' => 'Public',
),
),
'CRM_Member_DAO_MembershipType' => array(
array(
'fieldName' => 'visibility',
'sample' => 'Public',
),
),
'CRM_Price_DAO_Field' => array(
array(
'fieldName' => 'visibility_id',
'sample' => 'Public',
),
),
'CRM_Financial_DAO_EntityFinancialAccount' => array(
array(
'fieldName' => 'financial_account_id',
......
......@@ -58,16 +58,19 @@
<add>3.2</add>
</index>
<field>
<name>activity_type_id</name>
<title>Activity Type ID</title>
<import>true</import>
<type>int unsigned</type>
<required>true</required>
<export>false</export>
<default>1</default>
<headerPattern>/(activity.)?type(.id$)/i</headerPattern>
<comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
<add>1.1</add>
<name>activity_type_id</name>
<title>Activity Type ID</title>
<import>true</import>
<type>int unsigned</type>
<required>true</required>
<export>false</export>
<default>1</default>
<headerPattern>/(activity.)?type(.id$)/i</headerPattern>
<comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
<add>1.1</add>
<pseudoconstant>
<optionGroupName>activity_type</optionGroupName>
</pseudoconstant>
</field>
<index>
<name>UI_activity_type_id</name>
......@@ -227,6 +230,9 @@
<type>int unsigned</type>
<comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment>
<add>2.0</add>
<pseudoconstant>
<optionGroupName>activity_status</optionGroupName>
</pseudoconstant>
</field>
<field>
<name>priority_id</name>
......
......@@ -52,6 +52,9 @@
<comment>Implicit FK to civicrm_option_value where option_group = activity_type</comment>
<import>true</import>
<add>3.3</add>
<pseudoconstant>
<optionGroupName>activity_type</optionGroupName>
</pseudoconstant>
</field>
<index>
<name>UI_activity_type_id</name>
......
......@@ -75,5 +75,8 @@
<type>int unsigned</type>
<comment>whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group</comment>
<add>3.0</add>
<pseudoconstant>
<optionGroupName>visibility</optionGroupName>
</pseudoconstant>
</field>
</table>
......@@ -170,7 +170,11 @@
<title>Visible</title>
<type>varchar</type>
<length>64</length>
<add>1.5</add>
<add>1.5</add>
<pseudoconstant>
<optionGroupName>visibility</optionGroupName>
<labelColumn>label</labelColumn>
</pseudoconstant>
</field>
<field>
<name>weight</name>
......
......@@ -149,6 +149,9 @@
<default>1</default>
<comment>Implicit FK to civicrm_option_group with name = \'visibility\'</comment>
<add>3.2</add>
<pseudoconstant>
<optionGroupName>visibility</optionGroupName>
</pseudoconstant>
</field>
<field>
<name>count</name>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment