On some older sites we are now getting warnings relating to ambiguities in relationship set ups.

relationship ambiguity warning

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

1 Answer 1


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.

  • "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
    – petednz - fuzion
    Jun 29, 2021 at 21:07
  • 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.
    – Demerit
    Jun 29, 2021 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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