Custom field in data source causes an empty line.
How to reproduce
- Add a select custom field to a membership (check is searchable) with options A, B, C
- In the data processor add a source and at additional filters select Is one of at this custom field and select 'A' and 'B' as a value
- In the data processor add some fields, such as membership id, the custom field etc...
- In the data processor add an output search/report
- Create a membership and set the custom field to value 'C'
- Run the search/report output from the data processor
In the search/report out I would expect the membership not be visible at all.
The membership is shown, the value for the custom field is empty
This is caused that the sql is something like
SELECT ... FROM civicrm_membership LEFT JOIN civicrm_value_custom_group ON civicrm_value_custom_group.entity_id = civicrm_membership.id AND civicrm_value_custom_group.custom_field IN ('A', 'B')
LEFT JOIN to an
INNER JOIN solves this issue.