We want to update a bunch of contacts with e-mail adresses and phone numbers, for which previously these did not exist. The import works fine, as a result the contacts now have a Home (for example) e-mail and phone, but these are not set as the Primary ones. Because of this, the new e-mails and phone numbers do not show up in reports, and cannot be used in contact search. Only when I view one of the updated contacts, click into the Email field and then, without changing anything, press Save, the email is set to Primary.

It appears that when the contact is first created, in case there is no e-mail or phone, the Primary flag is not set. During contact update, the address/phone is updated, but the Primary flag is left missing. Is it possible to set the e-mail and phone to Primary during import if these did not exist previously?

We're currently using CiviCRM 4.7.14.


2 Answers 2


That sounds like a bug - can you confirm you ran the import via the CiviCRM GUI?

On fixing this for you - do you have access (or work with someone) who has - to phpMyAdmin or MySQL?

  • Yes, I was using the CiviCRM GUI (4.7.14). I personally do not have access to phpMyAdmin or MySQL, but somebody else almost definitely has.
    – janisr
    Commented Aug 7, 2017 at 15:17

I've had the this same issue for at least a couple years now. I created this extension to "fix" the issue. It looks for related records (phone,email,address) of a contact and when none, or more than one are set to primary it sets just one to primary. Uses the sites default location type for primary.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.