diff --git a/module/execution/model.php b/module/execution/model.php index 29e476e65d..3c6ad82e4d 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2483,6 +2483,7 @@ class executionModel extends model ->where('t1.root')->eq((int)$executionID) ->andWhere('t1.type')->eq('execution') ->andWhere('t2.deleted')->eq('0') + ->beginIF($this->config->vision)->andWhere("CONCAT(',', t2.visions, ',')")->like("%,{$this->config->vision},%")->fi() ->fetchAll('account'); } diff --git a/module/project/model.php b/module/project/model.php index b363a80342..317b5466a7 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1841,6 +1841,7 @@ class projectModel extends model ->where('t1.root')->eq((int)$projectID) ->andWhere('t1.type')->eq($type) ->andWhere('t2.deleted')->eq('0') + ->beginIF($this->config->vision)->andWhere("CONCAT(',', t2.visions, ',')")->like("%,{$this->config->vision},%")->fi() ->fetchAll('account'); }