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

Added xml metadata for group_id column in various tables. CRM-12464

----------------------------------------
* CRM-12464: Search improvements in 4.4
  http://issues.civicrm.org/jira/browse/CRM-12464
parent 365cc343
Branches
Tags
No related merge requests found
......@@ -57,6 +57,8 @@ class CRM_Core_PseudoConstant {
private static $cache;
/**
* DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
*
* activity type
* @var array
* @static
......@@ -106,6 +108,8 @@ class CRM_Core_PseudoConstant {
private static $countryIsoCode;
/**
* DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
*
* group
* @var array
* @static
......@@ -162,6 +166,8 @@ class CRM_Core_PseudoConstant {
private static $worldRegions;
/**
* DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
*
* activity status
* @var array
* @static
......@@ -785,6 +791,8 @@ WHERE id = %1";
}
/**
* DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
*
* Get all groups from database
*
* The static array group is returned, and if it's
......@@ -1351,6 +1359,8 @@ WHERE id = %1";
}
/**
* DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
*
* Get all Activity Statuses.
*
* The static array activityStatus is returned
......
......@@ -49,6 +49,7 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
*/
function testOptionValues() {
// Create a custom field group for testing.
$custom_group_name = md5(microtime());
$api_params = array(
'version' => 3,
......@@ -58,6 +59,15 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
);
$result = civicrm_api('customGroup', 'create', $api_params);
// Create a Group for testing.
$group_name = md5(microtime());
$api_params = array(
'version' => 3,
'title' => $group_name,
'is_active' => TRUE,
);
$result = civicrm_api('group', 'create', $api_params);
/**
* daoName/field combinations to test
* Format: array[DAO Name] = $properties, where properties is an array whose
......@@ -68,6 +78,42 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
* - max: integer (default = 10) maximum number of option values expected.
*/
$fields = array(
'CRM_Contact_DAO_GroupContact' => array(
array(
'fieldName' => 'group_id',
'sample' => $group_name,
),
),
'CRM_Contact_DAO_GroupContactCache' => array(
array(
'fieldName' => 'group_id',
'sample' => $group_name,
),
),
'CRM_Contact_DAO_GroupOrganization' => array(
array(
'fieldName' => 'group_id',
'sample' => $group_name,
),
),
'CRM_Contact_DAO_SubscriptionHistory' => array(
array(
'fieldName' => 'group_id',
'sample' => $group_name,
),
),
'CRM_Core_DAO_ActionSchedule' => array(
array(
'fieldName' => 'group_id',
'sample' => $group_name,
),
),
'CRM_Mailing_Event_DAO_Subscribe' => array(
array(
'fieldName' => 'group_id',
'sample' => $group_name,
),
),
'CRM_Activity_DAO_Activity' => array(
array(
'fieldName' => 'activity_type_id',
......
......@@ -34,6 +34,11 @@
<required>true</required>
<comment>FK to civicrm group.</comment>
<add>2.0</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......@@ -60,6 +65,11 @@
<required>true</required>
<comment>FK to admin civicrm group.</comment>
<add>2.0</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>admin_group_id</name>
......
......@@ -29,11 +29,16 @@
<add>2.0</add>
</index>
<field>
<name>group_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>FK to civicrm group.</comment>
<add>2.0</add>
<name>group_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>FK to civicrm group.</comment>
<add>2.0</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......
......@@ -20,12 +20,17 @@
<autoincrement>true</autoincrement>
</primaryKey>
<field>
<name>group_id</name>
<type>int unsigned</type>
<title>Group ID</title>
<required>true</required>
<comment>FK to civicrm_group</comment>
<add>1.1</add>
<name>group_id</name>
<type>int unsigned</type>
<title>Group ID</title>
<required>true</required>
<comment>FK to civicrm_group</comment>
<add>1.1</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......
......@@ -18,11 +18,16 @@
<autoincrement>true</autoincrement>
</primaryKey>
<field>
<name>group_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>FK to civicrm_group</comment>
<add>2.1</add>
<name>group_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>FK to civicrm_group</comment>
<add>2.1</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......
......@@ -24,6 +24,11 @@
<required>true</required>
<comment>ID of the group</comment>
<add>2.0</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......
......@@ -33,10 +33,15 @@
<onDelete>CASCADE</onDelete>
</foreignKey>
<field>
<name>group_id</name>
<type>int unsigned</type>
<comment>Group Id</comment>
<add>1.1</add>
<name>group_id</name>
<type>int unsigned</type>
<comment>Group Id</comment>
<add>1.1</add>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......
......@@ -189,11 +189,16 @@
<onDelete>SET NULL</onDelete>
</foreignKey>
<field>
<name>group_id</name>
<type>int unsigned</type>
<comment>FK to Group</comment>
<add>3.4</add>
</field>
<name>group_id</name>
<type>int unsigned</type>
<comment>FK to Group</comment>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
<add>3.4</add>
</field>
<foreignKey>
<name>group_id</name>
<table>civicrm_group</table>
......
......@@ -16,10 +16,15 @@
<autoincrement>true</autoincrement>
</primaryKey>
<field>
<name>group_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>FK to Group</comment>
<name>group_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>FK to Group</comment>
<pseudoconstant>
<table>civicrm_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment