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) »
  • 'Spouse of' export only works one way
Pages: [1]

Author Topic: 'Spouse of' export only works one way  (Read 21088 times)

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
'Spouse of' export only works one way
August 17, 2012, 04:06:44 am
Last year there were a couple of forum posts about 'spouse of' exports only working one way ie showing Betty's spouse as Bill but not Bill's spouse as Betty.  Posts were at http://forum.civicrm.org/index.php/topic,22599.msg94739.html#msg94739 and http://forum.civicrm.org/index.php/topic,21106.msg88466.html#msg88466

The export only seems to show spouse data for the record with which the relationship was created. Last year I filed a Jira bug http://issues.civicrm.org/jira/browse/CRM-9347 but the fix is not due until 4.4

Ian Macdonald posted in June that he'd be interested in working on fixing this, but needs some pointers to know where to start. Please can someone reply to this thread to give him some pointers on this fix. I haven't clue but am very keen to see it fixed as my boss asked for a report including this field only this morning!  Many 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: 'Spouse of' export only works one way
August 17, 2012, 07:57:34 am

Can you check the sandbox version of Civi v4.2 and see if this is fixed there. There have been some fixes and improvements to the reciprocal relationship features

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

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: 'Spouse of' export only works one way
August 17, 2012, 09:28:25 am
Hi lobo.  I've just checked it on the 4.2 demo and the results are the same - one way.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: 'Spouse of' export only works one way
August 19, 2012, 07:05:59 am
Can you post the steps to reproduce? Is this issue limited to a particular report?
Try asking your question on the new CiviCRM help site.

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: 'Spouse of' export only works one way
August 19, 2012, 09:50:36 am
I just ensured that some people were related as 'spouse of' and then exported both husband and wife, including the 'spouse of' field.  That column only shows the spouse of one of the couple. 

This is the case whether both parties are included in the export or just one ie an export of Lindsey shows Peter as named spouse; an export of Peter does not show Lindsey as spouse; an export of Lindsey and Peter only shows a named spouse for Lindsey.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: 'Spouse of' export only works one way
August 19, 2012, 10:06:23 am
Take a look at /CRM/Export/BAO/Export.php around line 448 - you can see that only one relationship direction is accepted as input from the form, so this is a shortcoming in the code. The form currently only passes 'a_b' and 'b_a' as directions, but will need to be updated to also be able to pass 'r' (or something like that to indicate reciprocal) and the query will need to take that possibility into account.
Try asking your question on the new CiviCRM help site.

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: 'Spouse of' export only works one way
August 19, 2012, 12:11:17 pm
Thanks very much Coleman.  I'll try to get someone to take a look at it.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • 'Spouse of' export only works one way

This forum was archived on 2017-11-26.