Skip to content
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

CRM-19767 - Add case tokens to email activities #10252

Closed
wants to merge 2 commits into from

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Apr 26, 2017

In CiviCRM core, case tokens had only been partially implemented.

  • When doing Print/Merge Document from a case, tokens for {case.id}, etc, were available.
  • When doing Send Email from a case, the tokens were missing.

This fixes that.

@eileenmcnaughton
Copy link
Contributor

How's about a test :-)

@colemanw
Copy link
Member Author

colemanw commented Apr 26, 2017 via email

@eileenmcnaughton
Copy link
Contributor

CRM_Contribute_Form_AdditionalPaymentTest or CRM_Contribute_Form_Task_InvoiceTest might provide a starting point

@eileenmcnaughton
Copy link
Contributor

test this please

@@ -1576,7 +1576,7 @@ public static function replaceEntityTokens($entity, $entityArray, $str, $knownTo

/**
* @param int $caseId
* @param int $str
* @param string $str
* @param array $knownTokens
* @param bool $escapeSmarty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be space here before the @return string

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -352,6 +352,8 @@ public static function processMessageTemplate($formValues) {
* Process the form after the input has been submitted and validated.
*
* @param CRM_Core_Form $form
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a space here also before @throws \CRM_Core_Exception

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tunbola
Copy link
Contributor

tunbola commented May 3, 2017

Also in addition to what was already said, would be great to have some tests for this change. :)

@colemanw
Copy link
Member Author

colemanw commented May 3, 2017

@guanhuan will you assign adding the test please?

@eileenmcnaughton
Copy link
Contributor

I'm going to close this because it needs rebasing & I think it's better to re-open once (if) rebased than to keep it open

@colemanw
Copy link
Member Author

Drat. Github won't allow me to reopen a PR after rebasing it because of the force push it considers the branch to be different :(. I've opened a new one instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants