dev/core#2650 Add support for contribution_status_id to the processor
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 16 Jul 2021 00:59:06 +0000 (12:59 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 16 Jul 2021 11:15:34 +0000 (23:15 +1200)
commitcb31dd27a6cf97aa80643e3bd3f5345998419a7f
treee1a48f6c75d402bfddd96acb444fa74f1d420ef5
parentce38fdca60ef84a6d40b3a6728005c41ca3ae257
dev/core#2650 Add support for contribution_status_id to the processor

Per https://lab.civicrm.org/dev/core/-/issues/2650 the goal is to get the
token processor (for each entity, in this case contributions) to be processing fields
in the same way as the legacy processor does and for this to be thoroughly tested.

This allows us to expose the token processor classes to message template processing
and use them interchangeably, with an eventual goal of migrating over.

It turns out that althought 'Contribution Status ID' is exposed in the UI
for scheduled reminders it did not work. This left us open to simply add the
token contribution.contribution_status_id and add tests.

Per 2650 the handling of pseudoconstants is inconsistent but our preferred goal
is that they would follow apiv4 style syntax and that the actual field name
would hold the actual field value.

Although the token processor exposes a value 'status' - it seems this is likely never
actually exposed to the user and is probably unused.

We can come back to how to deprecate & remove
CRM/Contribute/Tokens.php
tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php