Fix activity tokens
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 15 Sep 2021 22:03:56 +0000 (10:03 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 15 Sep 2021 23:57:47 +0000 (11:57 +1200)
commitb441a50438a16e9bf923b1db47ce7e0c50fd6016
tree6e3dbe75d92bc171b36f45d794066c1656d8c501
parent979232c640ff461a16e4db0363bf8025144b1b5f
Fix activity tokens

I wasn't gonna touch these until the end but there
seems to be some active breakage so this does enough to get the following to
work - but leaves a full cleanup pass out of scope as it does
the reconcilliation between the trait & parent class
and any decisions about any finalised interface.

Tests cover the changes to tokens and
testActivityDateTimeMatchRepeatableSchedule covers the schedule rendering

Existing tokens still work but new-style are advertised with this

```

Subject: {activity.subject}
Date: {activity.activity_date_time}
Duration: {activity.duration}
Location: {activity.location}
Details: {activity.details}
Status ID: {activity.status_id}
(legacy) Status: {activity.status}
Status: {activity.status_id:label}
Activity Type ID: {activity.activity_type_id}
(legacy) Activity Type: {activity.activity_type}
Activity Type: {activity.activity_type_id:label}
Activity ID: {activity.activity_id}
(legacy) Activity ID: {activity.id}

(just weird) Case ID: {activity.case_id}
```
CRM/Activity/Tokens.php
CRM/Core/TokenTrait.php
tests/phpunit/CRM/Activity/Form/Task/PDFLetterCommonTest.php