diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index 56ef5f07..4a85e356 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -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; diff --git a/library/Director/Objects/SyncRule.php b/library/Director/Objects/SyncRule.php index c144f07c..97f0b472 100644 --- a/library/Director/Objects/SyncRule.php +++ b/library/Director/Objects/SyncRule.php @@ -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'));