-
-
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
Standardise our 2 pledge templates to use tokens, add tests #21847
Conversation
(Standard links)
|
99b8a1c
to
d3727ca
Compare
Should I laugh or cry about the expectation that a civi component should have more bugs than it does. On the topic of bugs though, the email I get for the receipt comes thru as the literal text |
@@ -1,4 +1,4 @@ | |||
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} | |||
{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}<p>{$greeting},</p>{/if} |
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.
This is preexisting but if updating anyway can you remove the <p></p>
from this text version?
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.
fixed
use Civi\Api4\Email; | ||
|
||
/** | ||
* Include dataProvider for tests |
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.
Copy/paste probably.
I think my problem with the receipt email is something else. So except for the |
Thanks @demeritcowboy I've pushed this up - ideally as I go through templates I'd add classes to support them like in #21611 - but I didn't do that on this one since there isn't a pledge token class yet & I wasn't sure how hard it would be to get review (that one seems a bit stalled). But for the participant ones which also use this old pattern I might have a go |
Great, thanks. Github doesn't seem to have noticed the push? Maybe a temp glitch? |
d3727ca
to
c8af617
Compare
@demeritcowboy fixed now - after re-checking the branch name... |
c8af617
to
358171f
Compare
The test fails were
|
I also put in the empty workflow message templates in that last force-push - https://github.com/civicrm/civicrm-core/compare/c8af61776e1b5dde005610f7ac1707135c223785..358171fba9d6dc164fc8153dbf98f30a95067e8b Eventually we will add these for all templates and they will specify the entities to render tokens for. However, these 2 are really just placeholders. I'm still on the fence about going that bit further & adding a pledge token class & migrating the pledge tokens to it - but suspect I'd be better to put the effort into the more used messages |
failures are now fixed in master - test this please |
358171f
to
2158534
Compare
I've merged but I don't think |
Clearing cache fixed the phone. I guess domain info is cached even after saving the org info form? Anyway it seems ok. |
@demeritcowboy I doubt that value changes much in 'real' use so probably not a biggie if the cache is a bit aggressive |
Ooh that sounds pretty smart! |
Overview
Standardise our 2 pledge templates to use tokens, add tests
Before
These 2 templates are still calling the legacy
getTokenDetails
which renders hooks (as well as using the tokent processor).$contact
and$domain
are assigned to the template and to some degree usedAfter
legacy
getTokenDetails
not longer called, templates updated to use tokensTechnical Details
Consistent with past template changes the upgrade script should upgrade any sites where the templates are not customised and notifty them if their templates are customised.
We have recently augmented this with a status check - which doesn't reply on them responding to the upgrade script
Comments
I think this is an appropriate level of effort for the pledge templates. My suspicion based on gitlab & github activity and general chat is that they are barely used, ditto pledge code in general