Skip to content

Commit

Permalink
Merge pull request #21037 from eileenmcnaughton/act_source
Browse files Browse the repository at this point in the history
Fix advertised token for source
  • Loading branch information
eileenmcnaughton authored Aug 6, 2021
2 parents 2cd5e29 + 57ffb5b commit a70b9fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/SelectValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public static function contributionTokens(): array {
'{contribution.cancel_reason}' => ts('Contribution Cancel Reason'),
'{contribution.receipt_date}' => ts('Receipt Date'),
'{contribution.thankyou_date}' => ts('Thank You Date'),
'{contribution.contribution_source}' => ts('Contribution Source'),
'{contribution.source}' => ts('Contribution Source'),
'{contribution.amount_level}' => ts('Amount Level'),
'{contribution.check_number}' => ts('Check Number'),
'{contribution.campaign}' => ts('Contribution Campaign'),
Expand Down
3 changes: 3 additions & 0 deletions tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ public function testTokenRendering(): void {
contribution_id {contribution.contribution_id} - not valid for action schedule
cancel date {contribution.cancel_date}
source {contribution.source}
legacy source {contribution.contribution_source}
financial type id = {contribution.financial_type_id}
financial type name = {contribution.financial_type_id:name}
financial type label = {contribution.financial_type_id:label}
Expand Down Expand Up @@ -321,6 +322,8 @@ public function testTokenRendering(): void {
'payment instrument id = 4',
'payment instrument name = Check',
'payment instrument label = Check',
'legacy source SSF',
'source SSF',
];
foreach ($expected as $string) {
$this->assertStringContainsString($string, $contributionDetails[$this->contacts['alice']['id']]['html']);
Expand Down

0 comments on commit a70b9fa

Please sign in to comment.