-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email sent from CiviCRM for a new Case and Activity does not evaluate the $activityTypeName or $manageCaseURL tokens #13324
Conversation
(Standard links)
|
paging @colemanw |
CRM/Case/BAO/Case.php
Outdated
@@ -1369,6 +1369,8 @@ public static function sendActivityCopy($clientId, $activityId, $contacts, $atta | |||
if ($caseId) { | |||
$activityInfo['fields'][] = array('label' => 'Case ID', 'type' => 'String', 'value' => $caseId); | |||
} | |||
$allActivityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE); | |||
$tplParams['activityTypeName'] = $allActivityTypes[$activityTypeId]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use the CRM_Core_PseudoConstant::getLabel()
function (example of that below in the diff of CRM_Case_XMLProcessor_Report
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@colemanw thanks for the review, we'll update the PR in the next few days.
@agilewarealok I've rebased and force-pushed your branch with the changes Justin & I discussed.
|
Reviewers note: I struggled to understand where the heck the |
@colemanw thanks mate. On this point: "Refrain from putting internal tracking numbers in commit messages" - it's our company policy to do this so commits are auto-linked with the related tasks in our Jira. Otherwise, we'd have no idea what code changes related to what. Sorry for the hassle. |
merging as per tag |
Overview
Copied from https://www.drupal.org/project/webform_civicrm/issues/2990790
Email sent from CiviCRM for a new Case and Activity does not evaluate the $activityTypeName or $manageCaseURL tokens and possibly other tokens as well.
Steps to reproduce:
https://www.drupal.org/files/issues/2018-08-06/2018-08-03_19-50-56-webform-case-activity-email.png
If the email is manually initiated from the Activity through the CiviCase in CIviCRM, then the Case related tokens are evaluated and the email is correct, see https://www.drupal.org/files/issues/2018-08-06/2018-08-03_19-51-09-civicrm-case-activity-email.png
Comments
This issue has been reported on drupal.org https://www.drupal.org/project/webform_civicrm/issues/2990790
This bug requires both a fix to Webform CiviCRM and CiviCRM core. Two separate PRs have been submitted:
Webform CiviCRM (PR 187), colemanw/webform_civicrm#187
CiviCRM Core (PR 13324), #13324
Agileware Ref: SUP-5762 and CIVICRM-947