Page MenuHomePhabricator

Show donor's address in TY email when donors is in NY State
Open, Needs TriagePublic

Description

This is needed so that it can be claimed by NYS donors. I think this can simply be added conditionally as a row below the donor's name.
See Slack https://wikimedia.slack.com/archives/C055LCDCZ7Z/p1777561467580539

Event Timeline

@ppenloglou To the receipt block, we add a conditional:
If the donor has a street address and state and their state is NY, then add their address.

Untested, but should be:
{if {contact.address_primary.street_address|boolean} && {contact.address_primary.state_province_id:abbr} == 'NY' && {contact.address_primary.country_id:abbr} == 'US'}}Address: {contact.address_primary.street_address}, {if {contact.address_primary.supplemental_address_1|boolean}}{contact.address_primary.supplemental_address_1}, {/if}{contact.address_primary.city}, {contact.address_primary.state_province_id:abbr} {contact.address_primary.postal_code}

Close enough to all of the relevant contacts have city, state and postal in Civi, so I don't think we need to worry about conditionals around those fields to avoid hanging commas for two contacts per year.

Gotcha, appreciate the conditional snippet! Will include this when building out the new TY receipt template soon!

AKanji-WMF subscribed.

Can I close this @ppenloglou or is it in your queue now?

It is in my queue but we can close this task @AKanji-WMF. This will be applied as part of the larger Civi Mail refresh happening right now. Lars created this more as of a reminder + how to.