Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.19, 4.6
-
Fix Version/s: 4.7
-
Component/s: Drupal Integration Modules
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Because these criteria don't allow you to specify "use only primary address", the civicrm_address table is joined without specifying "is_primary=1" (as is correctly done for fields when this setting is selected). This leads to non-primary addresses being included in the list, which yields two undesirable side-effects for contacts with multiple addresses:
- If the first address is in a different state, the state in the other address may be sorted in the wrong order. For example a contact which has a primary address in NM and a secondary address in AZ can be lead to the sorting of New Mexico directly after Arizona.
- The contact will be listed multiple times, once for each address.
I have a client for whom I'm seeking to fix this now, and will be happy to provide a PR if I can.