I just did an import (to verify weird behavior reported by a client), matching on first, last and email, with Update checked. The system has home set as default location type (=1). The contact had only one email and was set to "Govt" (a custom setting of location type =6) and since was the only email, was the primary. On import, with the email in the mapping set to Primary, the correct contact was matched, but the result was a duplicate email created of type Billing (=5). When inspecting the civicrm_email table the location_type_id=0 though (no setting for id=0)!

The primary email setting was not changed for my test, but examining the detailed log tables for their import, timestamps show the primary email was changed from the existing primary to the newly created billing email simultaneously (again contact record shows billing, but civicrm_email table shows location_type_id=0)!

Has anyone experienced this kind of behavior? I would expect the primary email to be updated no matter what location type, no?

Running Civi 4.7.23 in Drupal

  • I seem to recall a discussion on this recently on Github. Could you test against the dmaster demo and see if the problem exists in the master branch? – Jon G - Megaphone Tech Nov 6 '17 at 19:07
  • Yes, the same thing happened on the demo site running 4.7.25 (duplicate billing email created and primary switched to billing) - can't see DB to check location_type_id – Karen S Nov 8 '17 at 15:17
  • I think maybe you used a different demo site - I was thinking of dmaster.demo.civicrm.org. If it happens there, then you should open a ticket on issues.civicrm.org with steps to replicate. – Jon G - Megaphone Tech Nov 8 '17 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.