CRM-9877 Relationship type ommited in dropdown list when it's for all contacts

    Details

      Description

      By adding a new relationship between two contacts, if the contact type (A or B) of one of the types of relationships has been established to "all contacts", this relationship is not displayed in the dropdown list.

      It can be solved modifying /[DRUPAL_ROOT]/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php file as shown in attached patch.

        Attachments

          Activity

          [CRM-9877] Relationship type ommited in dropdown list when it's for all contacts
          Coleman Watts added a comment - - edited

          That patch is wrong. I'm not sure what problem it was trying to solve exactly (no steps to reproduce posted in this issue) but reversing the patch gives correct results for me.
          Steps to reproduce current bug caused by this patch:
          Create a relationship type between:
          contact_a: Individual
          contact_b: Any
          Now try creating a relationship for a household or organization. Both sides will be incorrectly shown in the dropdown select when only one is appropriate.

          David Greenberg added a comment -

          Reverting PR is https://github.com/civicrm/civicrm-core/pull/2603
          Tested 'All Contacts' on both A, B and both sides and filtering works as expected.

            People

            • Assignee:
              David Greenberg
              Reporter:
              iWi development

              Dates

              • Created:
                Updated:
                Resolved: