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

Relationship contact reports with group and relation type filters fails

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      When you extract a report filtered with a specific relation type and a specific group, the report fails no matching contacts.

      I debug this issue and I think that the problem is that the function "whereGroupClause" from the file "CRM/Report/Form.php" is not enough for a relationship report because it don't check if the contact comes from a "b_a" relationship.

      I don't know if this is a correct solution, but I patched this issue adding the same "whereGroupClause" function in the file "CRM/Report/Form/Contact/Relationship.php" only modifying the following lines:

      +if ($this->relationType == 'a_b') $relationship_contact=$this->_aliases['civicrm_contact'];
      + else $relationship_contact=$this->_aliases['civicrm_contact_b'];
        
      + return " {$relationship_contact}.id {$sqlOp} (
      - return " {$this->_aliases['civicrm_contact']}.id {$sqlOp} (
      

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              francescbassas Francesc Bassas i Bullich
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: