diff --git a/module/project/control.php b/module/project/control.php index c7320064c3..c6d9d53c0a 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -167,10 +167,16 @@ class project extends control public function ajaxGetCopyProjects() { $data = fixer::input('post')->get(); + + $model = $data->model; + if($data->model == 'agileplus') $model = array('scrum', 'agileplus'); + if($data->model == 'waterfallplus') $model = array('waterfall', 'waterfallplus'); + $projectPairs = $this->dao->select('id, name')->from(TABLE_PROJECT) ->where('type')->eq('project') ->andWhere('deleted')->eq(0) ->andWhere('vision')->eq($this->config->vision) + ->andWhere('model')->in($model) ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->beginIF(trim($data->name))->andWhere('name')->like("%$data->name%")->fi() ->fetchPairs();