sgladstone / com.pogstone.fancytokens

CiviCRM extension that provides tokens for events, contribution pages, greetings, profiles and forms. Tokens can be used in emails and letters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Casual Joint Greeting Tokens not evaluating gender

yosefromano opened this issue · comments

When using Formal joint tokens (those that include the individual prefix), the gender is evaluated to put the male first in the greeting (i.e. Mr. & Mrs. Smith). However, Casual joint tokens (those that exclude the individual prefix) put contact_a of the relationship as the first in the greeting regardless of the contact's gender or title. The only workaround is to delete the relationships where the husband is contact_b and recreate them.

Ideally, all joint tokens should evaluate the gender in order to put the male first.
As far as I can tell, it should be pretty straightforward to fix this by simply copying the conditionals used in formal joint greeting tokens to the casual joint greeting tokens.
Happy to chip in for a fix

Here are some screenshots from some tests I ran.

screen shot 2017-12-10 at 1 25 05 pm

screen shot 2017-12-10 at 1 24 16 pm

screen shot 2017-12-10 at 1 29 12 pm

screen shot 2017-12-10 at 1 27 40 pm

commented

It is a cultural thing, and I can see why some might find this an important issue. But, I do not find it ideal to force the male name to be first. Not to mention that in our dataset there are spouse relationships with two males or two females.

This would need to be configurable, as different organizations have different preferences. Also, a simple solution would be to use the formal tokens. In the case of a couple, the token would put "Mr." at the beginning.