Commit 8d04ae48 authored by agilewarealok's avatar agilewarealok Committed by colemanw

Activity emails: Fix activityTypeName template var & fix priority_id label

parent 0ab5c4c7
......@@ -1343,9 +1343,9 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
}
$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;
......@@ -1369,6 +1369,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
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')) {
......
......@@ -520,7 +520,7 @@ WHERE a.id = %1
$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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment