-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev/core#2650 Add support for names & labels for token pseudoconstants
This is per https://lab.civicrm.org/dev/core/-/issues/2650 - it - ensures that the 4 existing functions that deal with tokens handle tokens for the name and label for the (only) field that has had this treatment so far -contribution_status_id Hence both CRM_Core_SelecetValues::contributionTokens and CRM_Contribute_Tokens->tokenNames are tested to ensure they both return the same keys and labels for {contribution.contribution_status_id} {contribution.contribution_status_id:name} {contribution.contribution_status_id:label} And both rendering CRM_Contribute_Tokens via scheduled reminders and using CRM_Contribute_BAO_Contribution::replaceContributionTokens are tested to ensure they render them the same. In the context of this PR no existing tokens are altered or removed & there is only addition. However, the next step would be to remove the following token from {contribution.status}. Since there is no UI availability of this token it is likely unused - but that step would entail an upgrade script to remove it from the saved scheduled reminders. With those parts in place it should be possible to reconcile the remaining tokens, lock that parity in with tests and move on to exposing the contribution tokens to message templates. It would be nice to fully remove CRM_Contribute_BAO_Contribution::replaceContributionTokens or make it a wrapper for - however, I fear that might be quite challenging due to the way it's used with group bys & some pretty intense hackery.
- Loading branch information
1 parent
d38a96e
commit 046a056
Showing
6 changed files
with
136 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters