continue;
}
- // CRM-11662 Copy Case custom data
- $extends = array('case');
- $groupTree = CRM_Core_BAO_CustomGroup::getGroupDetail(NULL, NULL, $extends);
- if ($groupTree) {
- foreach ($groupTree as $groupID => $group) {
- $table[$groupTree[$groupID]['table_name']] = array('entity_id');
- foreach ($group['fields'] as $fieldID => $field) {
- $table[$groupTree[$groupID]['table_name']][] = $groupTree[$groupID]['fields'][$fieldID]['column_name'];
- }
- }
-
- foreach ($table as $tableName => $tableColumns) {
- $insert = 'INSERT INTO ' . $tableName . ' (' . implode(', ', $tableColumns) . ') ';
- $tableColumns[0] = $mainCaseId;
- $select = 'SELECT ' . implode(', ', $tableColumns);
- $from = ' FROM ' . $tableName;
- $where = " WHERE {$tableName}.entity_id = {$otherCaseId}";
- $query = $insert . $select . $from . $where;
- $dao = CRM_Core_DAO::executeQuery($query);
- }
- }
-
$mainCaseIds[] = $mainCaseId;
//insert record for case contact.
$otherCaseContact = new CRM_Case_DAO_CaseContact();
*/
public static function createCaseViewsQuery($section = 'upcoming') {
$sql = "";
- $scheduled_id = CRM_Core_Pseudoconstant::getKey('CRM_Activity_BAO_Activity', 'activity_status_id', 'Scheduled');
+ $scheduled_id = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_status_id', 'Scheduled');
switch ($section) {
case 'upcoming':
$sql = "CREATE OR REPLACE VIEW `civicrm_view_case_activity_upcoming`