Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Won't Fix
-
Affects Version/s: 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.5
-
Fix Version/s: Unscheduled
-
Component/s: CiviCRM Profile, Core CiviCRM
-
Labels:None
Description
We've first discovered this at a 2.0.6 install, but managed to reproduce it on http://drupal.demo.civicrm.org/ too.
Steps to reproduce:
- create a new contact
- add two phone numbers of different types (eg phone and fax) but same location (eg home)
http://drupal.demo.civicrm.org/civicrm/contact/view?reset=1&cid=104
- create a profile with two fields:
Contacts - Phone - Primary - Phone
Contacts - Phone - Primary - Fax
http://drupal.demo.civicrm.org/civicrm/admin/uf/group/field?reset=1&action=browse&gid=12
Result:
Only one of the phone numbers is displayed (selected from the db)
http://drupal.demo.civicrm.org/civicrm/profile/view?reset=1&id=104&gid=12
We'd expect that this selects the appropriate type of phone number belonging to the primary location (like other location fields) but instead it selects the phone marked as primary, which is technically correct but doesn't seem to work the way other stuff does.
Suggested solution is to rename civicrm_phone.is_primary to civicrm_phone.is_prefered (and making the analogous changes on the ui) and leaving this field out of the query when determining the primary phone numbers.