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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Relationships not showing primary address
Pages: [1]

Author Topic: Relationships not showing primary address  (Read 417 times)

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Relationships not showing primary address
October 08, 2012, 09:57:53 am
I have a child with two parents I want to create relationships for. I create the relationship child of for each parent. When I go into each parent to see the relationship the one parent shows the primary address of the child, but the other parent does not show the primary address. Do you know why this is? I tried to change the relationship on both ends and it still shows the incorrect city/state on the relationship tab.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Relationships not showing primary address
October 08, 2012, 10:53:50 am
Are you using core CiviCRM? What version? I tried your process on the demo site but adding the Parent of relationship does not automatically create a shared Address? That only happens for the Employer of relationship as far as I know? Or am I missing something?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships not showing primary address
October 08, 2012, 11:04:17 am
Here is the situation, we have added a location type of previous address. The child has a new address, so the old address location type is now set to previous address and the new primary address is set as the main address. I then added the two parents to his relationship tab as child of "Mom's name" and child of "Dad's name". When I go out to the dad's profile the city and state are the primary city and state (the new address). When I go out to the mom's profile and click on the relationship tab the city/state for the child are the previous city/state, not the primary one. So it is correct for one parent, but not the other for some reason. I would think the query to get the relationship city/state for the contact should pull based on the primary address.

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: Relationships not showing primary address
October 08, 2012, 04:35:14 pm

yes, seems like it is not selecting the is_primary address.

Would be great if you (or your developer / consultant) can investigate and submit a patch. I took a quick look at the code and seems like you should be able to fix it here:

CRM/Contact/BAO/Relationship.php, function makeURLClause

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Relationships not showing primary address

This forum was archived on 2017-11-26.