Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15626

Relationship Create Widget Not always showing the correct available relationships in select tool

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.4
    • Fix Version/s: 4.6
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None

      Description

      This issue is limited to situations in which the A and B sides of a relationship are of different top-level contact types. There may be problems also with relationship definitions when A and B are of the same top level contact-type.

      Problem 1: The add relationship widget allows an organization to assign a relationship when the relationship definition declares the relationship for an organization sub-type only.

      Problem 2: When using the relationship tab on an individual contact that is a subtype, the Add relationship widget does not show relationships that should be available in situatoins when the relationship definition uses an organization sub-type.

      I'll give two explicit examples of how to re-create the problems. Both problems can effect the same relationship. So in my example the same relationship applies to both examples.

      The relationship:
      Contact Type A: Organization => subtype: Church
      Contact Type B: Individual

      A => B Label "Church of"
      B => A Label "Congregational member of"

      Example Problem 1.
      Find any record of contact type "Organization" with NO sub-type. Click on the Relationships type and "Add relationship." Note that the "Church of" relationship is available when it should be limited to "Church" sub-contact types.

      Example Problem 2

      Jane Smart is an Individual of subtype "Student".
      Go to Jane Smart's record, click on Relationships and then Add relationship: the widget will NOT display "Congregational member of" as a possible choice. It should.

      Note that setting this relationship from the Church side of the relationship will work. Go an organization record of sub-type "Church", click on Relationships, Add Relationship, and "Church of" WILL be available. The availability to set the relationship should be reciprocal and available from each side of the relationship.

      If Jane were an individual without a sub-type, the relationship would be available on the widget.

      Also, with Jane still a student sub-type but if Contact Type A were set to "Organization" in the relationship definition instead of "Organization with subtype Church" the widget would also have shown the "Congregational member of".

      In general terms, the situation that sets off this asymmetry of implementation of a relationship is when the contact from which you creating the relationship is a sub-type when that side of the relationship is defined at the contact type top level AND the other side of the relationship is limited to the sub-type of a different top-level contact type.

      These examples have been set up and the problems confirmed on the CiviCRM 4.5.5 demo site.

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              shai Shai Gluskin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: