CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Changing Primary Location on a Contact
Pages: [1]

Author Topic: Changing Primary Location on a Contact  (Read 2366 times)

hitchcocknz

  • Guest
Changing Primary Location on a Contact
July 03, 2007, 01:48:31 pm
Hi all,
After importing, I have some contacts that had only Work location details.  These details got imported but the primary location remained set to "home" and the don't have any home details for these contacts.  Two questions I guess:
1) How during the import process can I set the primary location - can't see a way of doing it?
2) How can I rectify the situation by changing,  in a bulk way, the primary location of contacts?

With regards to the second question,  I can filter to get the contacts with a "work only address" but can't see a way of then updating which is their primary location.  Have looked at the bulk via profile option which sounded promising but couldn't see how that could do the job either.

Cheers
Shane

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Changing Primary Location on a Contact
July 03, 2007, 03:36:14 pm

Shane:

Can u reproduce this on http://demo.civicrm.org/ and if so please file an issue, attach a sample file and give us detailed instructions on how to reproduce.

If a contact has only one location (irrespective of location type), that location should be marked primary. Note that email address and phone are also part of location. So if u import an email address as Primary, that will go into Home and the address will go into Work if marked as such.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hitchcocknz

  • Guest
Re: Changing Primary Location on a Contact
July 03, 2007, 03:55:29 pm
I don't think it is a bug - rather my explanation is buggy :-)

The contact list I imported had contacts with some having work email addresses, some having home email addresses and some having both.  I modified the CSV import file to have separate work and home email fields.

When I imported I mapped the CSV work work email field to the CiviCRM email work field (and same for home).  That seemed to work ie. contacts had email adresses in the correct CiviCRM field.

The problem is, all contacts seem to get two locations (home and work) and home seems to always be the primary location, even when the fields are empty.  Is this expected behaviour?  If not I'll try and reproduce as requested.

Still interested in whether there is an easy way to rectify ie. change a certain groups primary location from Home to Work.

Cheers
Shane

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Changing Primary Location on a Contact
July 04, 2007, 04:10:55 am
shane:

Check Administer CiviCRM >> Location Type.  We use default "Location Type"  as Primary location for the contact. So if you are sure that all your contacts should have work as Primary location type then i think you should make Work as default. 

kurund
Found this reply helpful? Support CiviCRM

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Changing Primary Location on a Contact
July 04, 2007, 08:12:40 am

Shane:

This is potentially a bug (albeit an obscure one and highly unlikely to get fixed till a 2.x version). The problem is it does not detect correctly that the home location is empty and hence should not be created. the system creates both a home and work location and marks the home location primary since by default it is primary

Can u reproduce this on demo with a small data set. If so, we'll take a look at the code and see how difficult a fix this is

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hitchcocknz

  • Guest
Re: Changing Primary Location on a Contact
July 13, 2007, 01:48:58 am
Well now I have completed the actual task at hand I thought I had better come and wrap this up with a bug report.  However looking back at the data I imported it was actually a case of contacts have a home location with address information and a work location with an email address.  Since home location is the default, the email address doesn't show up when exporting primary information.  Makes sense.

If the import data only has work location information then indeed it does seem to set the default location to work.

Hence summary is - no fault that I can see.  However a feature request might be to have an option, when exporting primary information, that if that information isn't available for a particular field then obtain it from the next alternative location.  Reason for this is that for many contacts I have a work email but home address.  When exporting to various other applications, they support only one email address.

Shane

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Changing Primary Location on a Contact

This forum was archived on 2017-11-26.