I wonder why civi triggers relationship and employer changes when our users let a person share an organization's address. Existing works-for-relationship is being deactivated. This also happens when we share an address by api call. I just wrote a script which migrates addresses of related contacts that are aequivalent but not shared to shared addresses. Civi duplicates the relationship :/

Problem here is that a significant part of our contacts works for multiple organizations.

If this is not configurable shouldn't it be restricted to work location?

  • Is my question understandable?
    – nielo
    Jul 18, 2016 at 9:56

1 Answer 1


I suspect this is the result of poor assumptions. When you configure an individual to use a shared address of an org, Civi creates an employer/employee relationship with that org -- which makes sense. But it also assumes that employer/employee relationship is the current employer for the individual, which may be too much of an assumption.

In your description you indicated that it "deactivated" the existing relationship. I ran a quick test and found that the org I've just shared an address with becomes the current employer, but the existing relationship is still preserved and enabled -- it just isn't flagged as the current employer. Are you seeing something different? If you're seeing the relationship become disabled, that is more significant IMHO.

  • Thanks for your answer. I did see deactivated and – somehow worse – duplicated relationships. The latter in case of migration not-shared addresses to shared ones. A quick test now on 4.7.10 gave no relationship or employer changes when sharing addresses not marked as "work". I'll have to look at the code to check whether my first question is reflected already: is the behavior limited to work addresses. My questions
    – nielo
    Sep 22, 2016 at 8:30
  • Generally I think such assumptions should be configurable...
    – nielo
    Sep 22, 2016 at 8:44
  • I suspect the behavior extends to household address sharing as well. Shared addresses originated with that in mind and was later extended to allow sharing with any contact type. Sep 22, 2016 at 12:23
  • Okay, maybe I'll code a suggestion to address this.
    – nielo
    Sep 23, 2016 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.