Answers.Body: <p>Some general information is at <a href="https://docs.civicrm.org/user/en/latest/case-management/what-you-need-to-know/#system-status-warnings" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/latest/case-management/what-you-need-to-know/#system-status-warnings</a> but in an established install like yours you might need to poke around a bit and it will be specific to that install.</p>
  
  <p>First, make a backup and do any fixing on a copy first just in case.</p>
  
  <p>Then for your install it sounds like this should work:</p>
  
  <p>In the database do <code>UPDATE civicrm_relationship_type SET name_a_b = 'csw1a' WHERE id=78;</code>. The string is arbitrary just needs to be different from the other one.</p>
  
  <p>Then it depends whether you're using xml files or database storage.</p>
  
  <p>If xml files, make sure the case type has <code>csw1</code> in the CaseRoles section for the role (without the "a"). It's probably ok already.</p>
  
  <p>If database storage, edit the case type in the admin screens and you might see a blank row in the roles section. If so then delete that row and re-add it again, checking the case manager box if that was checked before. You want the "Case support worker is" choice.</p>
  
  <p>Then, if you have any customizations or extensions that reference it you may need to update those.</p>
  
  <p>If you have any relationships of that type that actually are backwards, i.e. in civicrm_relationship the contact_id_a and contact_id_b are reversed, then you'll need to reverse those.</p>
  
  <p>For anyone else seeing these warnings note that there are multiple variations and the above is specific to what was reported in the question. It's not the right solution for every situation. Also for astute readers you'll note that what you put in the xml is backwards from what you choose on the admin screens, and this is also true of what gets stored for the case type xml in the database even when using the admin screens.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-29T21:07:32.873Z
Answers.Text: "Then it depends whether you're using xml files or database storage "  Could be helpful to a noob (or a slow learner/quick forgetter like myself) to add here how a user can quickly identify if their system is using XML or database
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-29T21:26:44.713Z
Answers.Text: Sure - `select CONCAT(IF(definition IS NULL, 'Using files', 'Using database storage'), ' for id=', id, ', case type: ', title) as what FROM civicrm_case_type` should do it. If using files they're usually in custom_templates/CRM/Case/xml/configuration.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-06T11:53:12.477Z
Answers.LastActivityDate: 2020-04-06T12:22:08.913Z
Answers.LastEditDate: 2020-04-06T12:22:08.913Z
Answers.UserDisplayName: Demerit
Body: <p>On some older sites we are now getting warnings relating to ambiguities in relationship set ups.</p>
  
  <p><a href="https://i.sstatic.net/SU3is.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SU3is.png" alt="relationship ambiguity warning"></a></p>
  
  <p>What is the best way to change the relationship settings without affecting existing relationships?</p>
  
  <p>The relationship in the image is specified as the case manager in some case types, and I think that this is causing problems with the cases. (Clients are showing as their own case manager after the role has been assigned). But I have editted relationship settings before and broken cases.</p>
  
  <p>Is there a way to update settings for a relationship type that won't break existing relationship of that type, or any related cases?</p>
  
  <p>D7.69 C20.2</p>
  
Tags: <civicase><relationships>
Title: What's the best way to update ambiguous relationship types?
ThreadText: # What's the best way to update ambiguous relationship types?
  
  (Asked by: username_0 on 2020-04-06)
  
  On some older sites we are now getting warnings relating to ambiguities in relationship set ups.
  
  [![relationship ambiguity warning](https://i.sstatic.net/SU3is.png)](https://i.sstatic.net/SU3is.png)
  
  What is the best way to change the relationship settings without affecting existing relationships?
  
  The relationship in the image is specified as the case manager in some case types, and I think that this is causing problems with the cases. (Clients are showing as their own case manager after the role has been assigned). But I have editted relationship settings before and broken cases.
  
  Is there a way to update settings for a relationship type that won't break existing relationship of that type, or any related cases?
  
  D7.69 C20.2
  
  **Tags:** civicase, relationships
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-04-06. Score: 3 | Accepted answer
  
  Some general information is at <https://docs.civicrm.org/user/en/latest/case-management/what-you-need-to-know/#system-status-warnings> but in an established install like yours you might need to poke around a bit and it will be specific to that install.
  
  First, make a backup and do any fixing on a copy first just in case.
  
  Then for your install it sounds like this should work:
  
  In the database do `UPDATE civicrm_relationship_type SET name_a_b = 'csw1a' WHERE id=78;`. The string is arbitrary just needs to be different from the other one.
  
  Then it depends whether you're using xml files or database storage.
  
  If xml files, make sure the case type has `csw1` in the CaseRoles section for the role (without the "a"). It's probably ok already.
  
  If database storage, edit the case type in the admin screens and you might see a blank row in the roles section. If so then delete that row and re-add it again, checking the case manager box if that was checked before. You want the "Case support worker is" choice.
  
  Then, if you have any customizations or extensions that reference it you may need to update those.
  
  If you have any relationships of that type that actually are backwards, i.e. in civicrm\_relationship the contact\_id\_a and contact\_id\_b are reversed, then you'll need to reverse those.
  
  For anyone else seeing these warnings note that there are multiple variations and the above is specific to what was reported in the question. It's not the right solution for every situation. Also for astute readers you'll note that what you put in the xml is backwards from what you choose on the admin screens, and this is also true of what gets stored for the case type xml in the database even when using the admin screens.
  
  > **Comments:**
  > **username_2**: "Then it depends whether you're using xml files or database storage "  Could be helpful to a noob (or a slow learner/quick forgetter like myself) to add here how a user can quickly identify if their system is using XML or database  
  > **username_1**: Sure - `select CONCAT(IF(definition IS NULL, 'Using files', 'Using database storage'), ' for id=', id, ', case type: ', title) as what FROM civicrm_case_type` should do it. If using files they're usually in custom_templates/CRM/Case/xml/configuration.  
  
  ---
  
  