}
$tplParams = $activityInfo = array();
- //if its a case activity
+ $activityTypeId = CRM_Core_DAO::getFieldValue('CRM_Activity_DAO_Activity', $activityId, 'activity_type_id');
+ // If it's a case activity
if ($caseId) {
- $activityTypeId = CRM_Core_DAO::getFieldValue('CRM_Activity_DAO_Activity', $activityId, 'activity_type_id');
$nonCaseActivityTypes = CRM_Core_PseudoConstant::activityType();
if (!empty($nonCaseActivityTypes[$activityTypeId])) {
$anyActivity = TRUE;
if ($caseId) {
$activityInfo['fields'][] = array('label' => 'Case ID', 'type' => 'String', 'value' => $caseId);
}
+ $tplParams['activityTypeName'] = CRM_Core_PseudoConstant::getLabel('CRM_Activity_DAO_Activity', 'activity_type_id', $activityTypeId);
$tplParams['activity'] = $activityInfo;
foreach ($tplParams['activity']['fields'] as $k => $val) {
if (CRM_Utils_Array::value('label', $val) == ts('Subject')) {
$activity['fields'][] = array(
'label' => ts('Priority'),
- 'value' => CRM_Core_PseudoConstant::getLabel('CRM_Activity_DAO_Activity', 'priority',
+ 'value' => CRM_Core_PseudoConstant::getLabel('CRM_Activity_DAO_Activity', 'priority_id',
$activityDAO->priority_id
),
'type' => 'String',