Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.5
-
Fix Version/s: 4.3.0
-
Component/s: CiviCRM Profile
-
Labels:None
Description
Appears to be looking for primary based on location type where it should look only to primary regardless of location type.
CRM_Contact_BAO_Contact::getPrimaryLocationType is returning the first location type specified as primary from these objects in this order:
email
address
phone
im
openid
And then CRM_Core_BAO_UFGroup::setProfileDefaults uses that to set the default values on any primary fields. The issue is that it uses one location type (based on the first one found in above list) to find and set default values for primary email, address, and phone fields.
As an example, if the email specified as primary has a location type of "Home" and the address specified as primary has a location type of "Work", setting of the default value on the address will be skipped because it's looking to use the "Home" address object to set defaults.
See discussion: http://forum.civicrm.org/index.php/topic,21238.0/topicseen.html