Details
-
Type: Improvement
-
Status: Open
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.6.10
-
Fix Version/s: Unscheduled
-
Component/s: CiviReport
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
If you want to create a report template, and you need to join e.g. civicrm_relationship twice, you can use the base CRM_Report_Form if you use table aliases for the keys in $this->_columns of your report form class. (This might not be the intended way to do it, but it seems to work.)
But if you also want to filter on the custom fields of the relationships, you cannot use the generated where clause, because somewhere here in the code https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Form.php#L3798 CiviCRM assumes that the custom fields only need to be joined to one table, $aliases['civicrm_relationship'] in case of realtionships.
It would be nice if you could join an entity twice or more in a report, while still able to filter on the custom fields.