Sync: Respect the fields used in filter_expression of the SyncRule
So that you can filter by fields not used in properties, or in property filters. fixes #1130 refs #876
This commit is contained in:
parent
59eda8f9c4
commit
e9546f68bf
|
@ -283,6 +283,12 @@ class Sync
|
|||
$filterColumns[$column] = $column;
|
||||
}
|
||||
}
|
||||
if (($ruleFilter = $this->rule->filter()) !== null) {
|
||||
foreach ($ruleFilter->listFilteredColumns() as $column) {
|
||||
$filterColumns[$column] = $column;
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($filterColumns)) {
|
||||
foreach (SyncUtils::getRootVariables($filterColumns) as $column) {
|
||||
$usedColumns[$column] = $column;
|
||||
|
|
|
@ -203,7 +203,10 @@ class SyncRule extends DbObject
|
|||
return $this->sync;
|
||||
}
|
||||
|
||||
protected function filter()
|
||||
/**
|
||||
* @return Filter
|
||||
*/
|
||||
public function filter()
|
||||
{
|
||||
if ($this->filter === null) {
|
||||
$this->filter = Filter::fromQueryString($this->get('filter_expression'));
|
||||
|
|
Loading…
Reference in New Issue