-
-
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
CRM-8526, CRM-19786, CRM-18141, CRM-19757 : Fix Schedule Reminder tokens #9661
Conversation
monishdeb
commented
Jan 10, 2017
•
edited by civicrm-builder
Loading
edited by civicrm-builder
- CRM-18141: Scheduled reminders for activities not rendering custom field tokens
- CRM-19757: Some tokens stopped working in scheduled reminders
- CRM-8526: Support [contribution.custom_nn] tokens in templates
- CRM-19786: ActionSchedule assumes presence of tokens which are not registered
@monishdeb you may also want to look at #9542 (comment) from @xurizaemon who has been touching similar areas and his also has a test |
@seamuslee001 yes I know. I saw that PR earlier which in my opinion a bit different than my proposed fix, as I am not in a favor of bringing changes in BAO. Also, we need a generic fix to fetch all those missing token values for fields like custom field, greeting etc. I have marked this PR with |
Yep just wanted to make sure it was on your radar and agree re generic fix |
I like to cherry-pick the test-case 08f9b27 written by @xurizaemon :) And also extend the existing SR unit test, to assert custom field token for all SR supported entities. |
Jenkin test this please |
I like latest commits -- they mean that custom_123 tokens are enumerable and that new token-providers can be mixed-in. One thought: In the call to But we're probably only trying to solve the single-value scenario? So |
Agree with Tim i think multi value fields will be difficult to manage. |
@totten @seamuslee001 I have solved the greeting issue and supported multi-valued custom value. This is the mail template And this is the final mail content As you can see the multi-value token is replaced by comma-separated labels (This is my latest commit 8640061) |
Also, extended unit-test to assert |
Hi @monishdeb. Performing the steps to reproduce error behavior in CRM-18141 (https://issues.civicrm.org/jira/browse/CRM-18141?focusedCommentId=98230&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-98230), I'm finding a fatal error generated by the "Send Scheduled Reminders" scheduled job. Here is the job log:
Oddly, I enabled CiviCRM debug settings including backtrace, but am not getting an on-screen backtrace for this error; not sure why. My test configuration is, for the moment, still available on the Jenkins test site at http://core-9661-43dy0.test-ubu1204-5.civicrm.org/ Also, I tried merging this patch on my local dev master, but encountered failed hunks. Probably not your problem, but in case it's relevant to you:
|
Tagging in @andrew-cormick-dockery as a watcher to this PR |
Just reporting that @andrew-cormick-dockery tested this on our test site and it passed testing |
@seamuslee001 and @andrew-cormick-dockery Thanks for reporting! Since this PR covers a wide variety of JIRA tickets, can you please share the steps you took to test? Thanks! |
We tested this out by Firstly cherry-picking the commits locally (we have core + packages + drupal all in 1 repo). Once that was done we then set the CIVICRM_MAIL_LOG setting. Then ran the scheduled reminders job checked the output of the emails that were logged. Verified that {{contact.eamil_greeting}} was correctly outputted |
FYI, after merging this into master on local dev, I'm getting a DB syntax error when sending Scheduled Reminders, but this is happening in without the PR as well. The syntax error isn't caused by this PR, but it's preventing me from testing, so I need to look a little closer. |
@monishdeb I've tested this successfully for CRM-18141.
|
nice work @twomice, difference for me was we were testing on 4.7.15 code base locally not 4.7.16. |
Thanks @seamuslee001 I was getting thrown off by a regression in 4.7.16 (CRM-19885) but once that was fixed this patch turned out fine (for my purposes, anyway). |
@totten @monishdeb @yashodha I think this can be merged now with the successful testing that has happened. |
Great, will merge this as per confirmation. Thanks everyone :) |
I see this PR includes all extendable entities (activities, member, events). Just for clarity, does this also mean custom fields that extend the participant would be available in the scheduled mailings? Would that follow {participant.custom_xxx}? (In terms of the data of the sandbox: I would like to include the Food Preference of the Fall Fundraiser dinner in a scheduled email to the participants) |
Probably not the best place to comment. I placed my comment also in the JIRA issue: https://issues.civicrm.org/jira/browse/CRM-18141?filter=19310 Thanks all for your help! |
I have a report that {contribution.custom_xx} is not working. @seamuslee001 was that included in your range of testing that led to @yashodha doing the merges? |
@JoeMurray Joe it wasn't part of my teams testing we were mainly looking at the contact.email_greeting token. i'm not sure if @twomice did any testing in that type of token |
My testing was limited to what I documented above (#9661 (comment)), specifically related to CRM-18141. It may be that this was PR merged without testing on all of the issues it was expected to cover. |
There are several JIRA issues open on tokens at the moment and I am afraid that this very welcome fix/improvement will stagnate or even get lost somewhere. |