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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Automatic relationship Household member
Pages: [1]

Author Topic: Automatic relationship Household member  (Read 504 times)

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Automatic relationship Household member
September 05, 2013, 03:58:36 am
Today I was working on a migration script which havenly used the civi api.
I discovered the following feature/bug:

This is what I do with the API
  • Cretae household
  • Create address for household
  • Create an individual
  • Create an address for the individual, and set master_id to household address id.

Expected outcome:
- An household with an address
- An individual with a shared address of the household
- NO relationships between them because I haven't created the relationship

Real outcome
- An household with an address
- An individual with a shared a adress
- A relationship of type household member between the household and the individual

Is this correct? Or is this something which could be a feature but is in reality a bug?

When I unset the shared address the relationship is not created.
Developer at Edeveloper / CiviCoop

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automatic relationship Household member
September 05, 2013, 08:32:57 am
I'd call this a feature rather than a bug. The api handles current employer the same way (if you share an address with an org it creates the relationship)
Try asking your question on the new CiviCRM help site.

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Automatic relationship Household member
September 05, 2013, 10:04:11 am
Thanks. That is good to know and comes in quite handy.
Developer at Edeveloper / CiviCoop

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Automatic relationship Household member
September 05, 2013, 02:39:32 pm
unless there is a unit test for it it probably doesn't qualify as a feature as there are no guarantees it won't break in a future version.

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Automatic relationship Household member

This forum was archived on 2017-11-26.