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

Advanced Search does not filter relationships with deleted contacts

    Details

    • Documentation Required?:
      None

      Description

      When doing an Advanced Search on relationships, the results include relationships with deleted contacts. This is clearly a bug and these results should be filtered out by the WHERE clause of the query.

      Steps to reproduce:

      • create a Is Subsidiary of / Is Parent Company of relationship
      • enable this relationship between two contacts Parent Co. and Subsidiary Co.
      • delete the contact Parent Co.
      • do an Advanced Search on:
      • Relationship: Is Subsidiary of
      • Relationship status: Active
        The Subsidiary Co. is part of the results. Yet, when you go to the relationships tab of their contact sheet no relationships are listed.

      The behavior to keep the relationship record, and in an active state, when deleting either the contact_a or contact_b of a relationship seems correct as when you undelete a contact you would want all their relationships to reappear the way they were before deletion.

      So the incorrect behavior is in the Advanced Search that should filter these results in the same way as the relationship tab does on the contact screen.

        Attachments

          Activity

            People

            • Assignee:
              atif.shaikh Atif Shaikh
              Reporter:
              nganivet Nicolas Ganivet
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 30 minutes
                30m
                Remaining:
                Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - Not Specified
                Not Specified