Answers.Body: <p>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.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-22T08:30:51.090Z
Answers.Text: 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
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-22T08:44:15.163Z
Answers.Text: Generally I think such assumptions should be configurable...
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-22T12:23:29.823Z
Answers.Text: 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.
Answers.UserDisplayName: lcdservices
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-23T09:11:13.370Z
Answers.Text: Okay, maybe I'll code a suggestion to address this.
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-21T10:33:48.670Z
Answers.LastActivityDate: 2016-09-21T10:33:48.670Z
Answers.UserDisplayName: lcdservices
Body: <p>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 <em>not</em> shared to shared addresses. Civi duplicates the relationship :/ </p>
  
  <p>Problem here is that a significant part of our contacts works for multiple organizations. </p>
  
  <p>If this is not configurable shouldn't it be restricted to work location?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-18T09:56:25.427Z
Comments.Text: Is my question understandable?
Comments.UserDisplayName: nielo
Tags: <addresses><core><location-type>
Title: Why does civi sets employer relationship on sharing address – even if api triggered?
ThreadText: # Why does civi sets employer relationship on sharing address – even if api triggered?
  
  (Asked by: username_0 on 2016-07-14)
  
  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?
  
  **Tags:** addresses, core, location-type
  
  > **Comments:**
  > **username_0**: Is my question understandable?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-09-21. Score: 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.
  
  > **Comments:**
  > **username_0**: 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  
  > **username_0**: Generally I think such assumptions should be configurable...  
  > **username_1**: 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.  
  > **username_0**: Okay, maybe I'll code a suggestion to address this.  
  
  ---
  
  