-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#2834 Use event tokens for participant badges #21587
Conversation
(Standard links)
|
@agileware-justin ping - this is part of getting participant & event tokens working properly |
@eileenmcnaughton thanks for the ping, I tried to test this using CiviCRM 5.43.alpha1 from nightly, https://download.civicrm.org/latest/civicrm-NIGHTLY-wordpress.zip But that build is failing to save any changes, Contacts and Scheduled Reminders fail to save. The patch applies, but I'm not sure if that's the right version. It looks like this PR is just for Event badges? Does it apply to Scheduled Reminders as well, as that's the functionality I am trying to test. |
@agileware-justin no - it doesn't touch scheduled reminders at this stage - it is preliminary work - the job of fixing the tokens involves ensuring tha they are consistently rendered and tested to be consistently rendered for everywhere in the code. So this is part of that foundation-laying. |
Ahh right, false ping? Maybe let me and other interested ppl know on this Gitlab, https://lab.civicrm.org/dev/core/-/issues/348 |
well the standardisation & tests are 'the work' - but yeah - you might be best to test the rc once it's merged / stable rather than engage in all the work that gets it to that point |
Thanks @eileenmcnaughton for all the hard work in the token area in the last weeks. I have been following the process and your commits and am glad this will all work towards a more robust and reliable token processing. About this PR: I have tested name badge creation with and without this patch. Update on date fields: |
@magnolia61 thanks for testing! Regarding the event custom fields - with this patch I think they would work - but not be selectable since the event tokens on this page are hard coded still... - it wouldn't be too big a lift if there is demand for it but it add a lot more fields (until we resolve a more filterable list) Note I've added quite a long write up to the dev-digest about tokens & also created a meta-ticket https://lab.civicrm.org/dev/core/-/issues/2864 |
d6b5eaf
to
47cbd81
Compare
@magnolia61 can you test again now - I just tried & got this
|
ff07249
to
87906a8
Compare
Just tested the updated pr again and date handling is perfect now and event core tokens, participant core and custom tokens work as expected in the badge creation. |
@seamuslee001 ^^ ok to merge? Thanks @magnolia61 ! |
b82bb4b
to
4eab77b
Compare
@magnolia61 I made a couple of edits to get this to pass. Can you do one final test - post merge probably since I'll still merge this if tests pass. |
Overview ---------------------------------------- Convert the rest of event badge token replacement to use the token processor Before ---------------------------------------- Testing and conversion had been done for contact and participant tokens within the event badges - but for the event tokens tests had been added but the conversion was pending solving date formatting After ---------------------------------------- Event badges use the token processor for event tokens At this point all token processing in core for participant or event tokens is done in the token processor & attention can switch to cleaning that up Technical Details ---------------------------------------- The challenge switching over event tokens was that badges used a custom date format and we needed to figure out how to support that first. This also standardises the event.event_id token to participant.event_id and updates it in the db for scheduled reminders (badges were using 'event.id' format & reminders the event.event_id format). There are still some tokens on the scheduled reminders to standarsise and a loading challenge to fix - but this concludes the badge portion of fixing up event tokens Note that the tokenConsistencyTest is the main test cover for event tokens and it turns out we are not quite there on the dates based on civicrm#21584
4eab77b
to
873bfeb
Compare
Tested the updated PR: same result. All works fine and as expected! I hope this groundwork will help opening up the same for the scheduled reminders in some next step. Thanks again for your passion for robust and reliable quality and looking at what is good for civicrm longterm. |
@magnolia61 yes - so I am close to having a working patch locally for you to test on that! |
'updateMessageToken', '', 'contribution.campaign', 'contribution.campaign_id:label', $rev | ||
'updateMessageToken', '', 'contribution.campaign', 'contribution.campaign_id:label', $rev); | ||
$this->addTask('Update start date token in event badges', | ||
'updatePrintLabelToken', 'event.start_date', 'event.start_date|crmDate:"%B %E%f', $rev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the typo (note the missing quotation mark after %f
) that I'm referencing in my note on core#3952.
Overview
Convert the rest of event badge token replacement to use
the token processor
Before
Testing and conversion had been done for contact
and participant tokens within the event badges - but
for the event tokens tests had been added but
the conversion was pending solving date formatting
After
Event badges use the token processor for event tokens
At this point all token processing in core for
participant or event tokens is done in the token
processor & attention can switch to cleaning that up
Technical Details
The challenge switching over event tokens was that badges used
a custom date format and we needed to figure out how to support
that first.
This also standardises the event.event_id token to participant.event_id
and updates it in the db for scheduled reminders (badges were using
'event.id' format & reminders the event.event_id format).
There are still some tokens on the scheduled reminders to
standarsise and a loading challenge to fix - but this
concludes the badge portion of fixing up event tokens
Note that the tokenConsistencyTest is the main test cover
for event tokens and it turns out we are not quite there
on the dates based on #21584