Commit 2c6d4780 authored by jaapjansma's avatar jaapjansma
Browse files

* Fixed issue with joins and filters on a data source.

parent f1d6b9ca
# Version 1.40 (not yet released)
# Version 1.40
* Fixed issue with joins and filters on a data source.
# Version 1.39
......
......@@ -221,7 +221,12 @@ class CombinedSqlDataFlow extends SqlDataFlow implements MultipleSourceDataFlows
foreach($this->sourceDataFlowDescriptions as $sourceDataFlowDescription) {
if ($sourceDataFlowDescription->getDataFlow() instanceof SqlDataFlow && !$sourceDataFlowDescription->getDataFlow() instanceof SubqueryDataFlow) {
foreach($sourceDataFlowDescription->getDataFlow()->getWhereClauses() as $clause) {
$clauses[] = $clause;
if ($clause->isJoinClause() && $includeJoinClause) {
$clauses[] = $clause;
}
if (!$clause->isJoinClause() && $includeNonJoinClause) {
$clauses[] = $clause;
}
}
}
}
......
......@@ -474,8 +474,8 @@ class SimpleJoin implements JoinInterface, SqlJoinInterface {
$extraClause = "";
$dataFlow = $sourceDataFlowDescription->getDataFlow();
if ($dataFlow instanceof SqlTableDataFlow) {
$whereClauses = $dataFlow->getWhereClauses();
if ($dataFlow instanceof SqlDataFlow) {
$whereClauses = $dataFlow->getWhereClauses(TRUE, FALSE);
foreach($whereClauses as $whereClause) {
if ($whereClause->isJoinClause() && $whereClause) {
$this->filterClauses[] = $whereClause;
......
......@@ -14,8 +14,8 @@
<url desc="Documentation">https://lab.civicrm.org/extensions/dataprocessor/blob/master/README.md</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2021-07-02</releaseDate>
<version>1.40-dev</version>
<releaseDate>2021-07-05</releaseDate>
<version>1.40</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.20</ver>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment