CRM-20759 (follow up fix) Primary address is 'distributed' over several ID
authoreileen <emcnaughton@wikimedia.org>
Mon, 24 Jul 2017 12:28:46 +0000 (00:28 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 24 Jul 2017 12:32:11 +0000 (00:32 +1200)
commitc77e8e333b8971b43f6b07c08dc4b744a0b81e75
tree93facea09d259a31305d71bd6294c103e3218acb
parent7e38353d4e4f47d5e0ea05815990a462cd892c8c
CRM-20759 (follow up fix) Primary address is 'distributed' over several ID

This wasn't picked up originally in the test as it was only using one field of the primary type.

The old code was indexing by 'addressCnt' (checking that the location type id was different each time). I
have switched to index by location_type_id - we should only have one address per location type per contact.

I also removed the code that sets 'is_primary' if we are importing the first address for a contact.
That has been handled by the BAO for some time
CRM/Contact/Import/Parser/Contact.php
tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php