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) »
  • Can't figure out export of "master address belongs to"
Pages: [1]

Author Topic: Can't figure out export of "master address belongs to"  (Read 2549 times)

jtbayly

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
Can't figure out export of "master address belongs to"
November 22, 2011, 02:37:58 pm
I've got some contacts (e.g. a child) that share an address with another contact (e.g. a parent). I'm exporting the following 4 individual fields: Contact ID, First Name, Last Name, and Master Address Belongs To.

"Master Address Belongs To" only has a value when the contact is using another contact's address, but its output seems to be a completely random integer, as far as I can tell. I was thinking it would be the Internal Contact ID of the contact that the shared address belongs to, but it isn't.

Can anybody tell me if I'm doing something wrong?

Thanks,
-Joseph

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Can't figure out export of "master address belongs to"
November 22, 2011, 02:45:28 pm
The value being exported MIGHT be the primary key (civicrm_address.id) of the "master" (shared) address.
Protect your investment in CiviCRM by  becoming a Member!

jtbayly

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
Re: Can't figure out export of "master address belongs to"
November 22, 2011, 03:25:58 pm
So it is!

So... is that a bug, or does it make sense somehow? I can't figure out why that would be helpful. Since I can't export the id of the address for a normal contact, I'm betting it's a bug, right?

-Joseph

Chris / Kampaweb

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM-Beratung im deutschsprachigen Gebiet
    • Kampaweb
  • CiviCRM version: 3.3.6
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.54
  • PHP version: 5.3
Re: Can't figure out export of "master address belongs to"
November 23, 2011, 12:31:27 am
The master address ID has mystified me (and seemingly others e.g. here: http://forum.civicrm.org/index.php?topic=19143.0), too, in the past. Is there any documentation available?

@Joseph: Do you just need the addresses for an export (e.g. for a postal mailing) or do you reimport them somewhere else? If so: Have you managed to achieve this? - I wasn't successful with this, so far.


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: Can't figure out export of "master address belongs to"
November 23, 2011, 06:48:43 am

The master address id should NOT be available for export. Please file an issue and we'll try to fix it before the 4.1 release

however i suspect it does not fix what you are after, i.e.: getting the shared address. that is probably a lot more complex

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

Chris / Kampaweb

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM-Beratung im deutschsprachigen Gebiet
    • Kampaweb
  • CiviCRM version: 3.3.6
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.54
  • PHP version: 5.3
Re: Can't figure out export of "master address belongs to"
November 23, 2011, 07:36:50 am
Just double-checked:

"Master address ID" was an option in export fields in V 3.3.6 but doesn't show up in 3.4.4 and above (i.e. 4.0.3).

I CAN still export "master address belongs to", though. This field just gives me the name of the organization / household an address is shared with. Guess, that's fine (even if not very helpful for the issue of reimporting shared address data).

Hence, no need to file an issue, I suppose!?

Could you possibly be a bit more specific (i.e. how "complex") on the address sharing issue?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Can't figure out export of "master address belongs to"
November 23, 2011, 10:52:11 am
Seems like if "master address belongs to" is already working correctly in export, then the code has derived the contact.id value for that contact and it could be made available as an export field. Would be great if you could dig into the code a bit more and investigate.
Protect your investment in CiviCRM by  becoming a Member!

jtbayly

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
Re: Can't figure out export of "master address belongs to"
November 23, 2011, 05:08:05 pm
Just to be clear, I'm running 3.4.7, and the "master address belongs to" does *not* work the way you've just described it. It gives the master address id, not the the id of contact the shared address belongs to.

phunter

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Drupal 7
Re: Can't figure out export of "master address belongs to"
December 09, 2011, 06:28:00 am
I have also been looking at this with regards the email token "Master Address Belongs To"
Currently this returns the Address id and not the contact id that owns the address.

Could somebody confirm what actually should be return and we can look into to see how easy this would be to resolve

Thanks

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: Can't figure out export of "master address belongs to"
December 09, 2011, 10:51:32 am

can one of you test this on our sandbox servers and see what it currently does. that would be great

thanx

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

phunter

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Drupal 7
Re: Can't figure out export of "master address belongs to"
December 09, 2011, 12:40:24 pm
I will take a look at the export issue but will be unable to test the token in the email since the sandbox does not allow the sending of emails.

Test Complete on the Drupal 7 CiviCRM sandbox
I can confirm that the export returns a different number to the contact id who owns the shared address. I would assume this is the address id.

I would have expected it to return the contact id


« Last Edit: December 09, 2011, 12:52:53 pm by phunter »

jeevajoy

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: joomal 1.6
  • MySQL version: 5
  • PHP version: 5
Re: Can't figure out export of "master address belongs to"
December 12, 2011, 02:42:47 am
Does anyone  know where can i  find the code for that particualr token. I'm trying to solve this issue but couldn't find the function where the value has been assigned..

Cheers,
Jeeva.
 

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Can't figure out export of "master address belongs to"
December 12, 2011, 10:14:13 am
Testing with 4.1 alpha I've confirmed that current behavior for both Export column and the token is to output the master address' primary key rather than the contact name or contact id of the contact to whom the master address belongs. I've filed an issue:

http://issues.civicrm.org/jira/browse/CRM-9329

Did a little digging around but didn't find the code
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Can't figure out export of "master address belongs to"

This forum was archived on 2017-11-26.