Merge branch 'sprint/hufangzhou_85049' into 'master'

* Code for task #85049.

See merge request easycorp/zentaopms!7008
This commit is contained in:
孙广明
2023-02-21 05:38:06 +00:00
+6
View File
@@ -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();