twomice / com.joineryhq.reltoken

CiviCRM extension: Provides tokens for any related contact, for all available contact tokens. E.g., to get the spouse's first name, or parent's marriage date.
Other
1 stars 5 forks source link

Default values aren't generated on install #7

Closed MegaphoneJon closed 3 years ago

MegaphoneJon commented 5 years ago

In your comments on #5 you asked me to to default the value of "generate tokens for this relationship" to "yes", which I did. However, that doesn't actually generate records in the custom value table; you need to edit and save a relationship for the change to take effect. I'm not sure how to fix that but I thought I'd report the bug I created :)

twomice commented 5 years ago

Thanks for reporting this @MegaphoneJon I don't entirely understand the issue; could I ask you to restate it in a "do this, then observe that" style?

MegaphoneJon commented 5 years ago

Sure!

MegaphoneJon commented 5 years ago

I realized how to handle this. On install (or maybe post-install - not sure if install hook runs before or after hook_civicrm_managed) one should do an API query for all existing RelationshipType records and update them by setting the new custom field to 1.

twomice commented 3 years ago

Attention @lucky091588.

twomice commented 3 years ago

Fixed in PR #16.