Skip to content

Commit

Permalink
Merge pull request #13473 from deb1990/C51-384-add-case-token-in-email
Browse files Browse the repository at this point in the history
C51-384: Added case tokens on Email Activity Modal
  • Loading branch information
colemanw authored Jan 20, 2019
2 parents 4e6e5cc + d7e297b commit 4e2d3ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CRM/Contact/Form/Task/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ public function postProcess() {
*/
public function listTokens() {
$tokens = CRM_Core_SelectValues::contactTokens();

if (isset($this->_caseId) || isset($this->_caseIds)) {
// For a single case, list tokens relevant for only that case type
$caseTypeId = isset($this->_caseId) ? CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $this->_caseId, 'case_type_id') : NULL;
$tokens += CRM_Core_SelectValues::caseTokens($caseTypeId);
}

return $tokens;
}

Expand Down

0 comments on commit 4e2d3ad

Please sign in to comment.