Contact Archetype

The current contact archetype has the country NODE disabled by default.   I would have thought the better handling practice would have been to hide the node, set a default but leave it enabled.  

Creating the additional required linkages such as countryState by default.

Address formatting can be adjusted to include and exclude the Country information. 

Enabling the country node causes test failures across most packages because the current Testhelper doesnt create the linkages to validate and save the archetype correctly.

This would mean that if you enable the country node at some point in the future all current contact.locations would not validate correctly.  

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Contact Archetype

If you want to change it, by all means go ahead.
 

A migration script will be needed for existing sites that don't populate the country to:

  • set up a default country and link the existing states to that country
  • populate existing location contacts with the country, if one isn't already present

Country codes probably should be constrained to ISO 3166-1 alpha 2 format to better support interoperability with other systems. See lookup.currency as an example.

Come to think of it, I don't know that there is a reliable way of determining the user's country from within MySQL, so there may need to be a 2 step process where the user sets a default country, and a migration script run to link states and populate each location contact.

 

 

Syndicate content