* Finish task #85049.

This commit is contained in:
hufangzhou
2023-02-20 07:23:49 +00:00
parent b2955aa657
commit 2c1995d4a9
3 changed files with 5 additions and 3 deletions
+4 -1
View File
@@ -1090,12 +1090,15 @@ class projectModel extends model
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectPairs();
if($model == 'agileplus') $model = array('scrum', 'agileplus');
if($model == 'waterfallplus') $model = array('waterfall', 'waterfallplus');
$projects = $this->dao->select('id, name, path')->from(TABLE_PROJECT)
->where('type')->eq('project')
->andWhere('deleted')->eq('0')
->beginIF($programID)->andWhere('parent')->eq($programID)->fi()
->beginIF($this->config->vision)->andWhere('vision')->eq($this->config->vision)->fi()
->beginIF($model != 'all')->andWhere('model')->eq($model)->fi()
->beginIF($model != 'all')->andWhere('model')->in($model)->fi()
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->beginIF(strpos($param, 'multiple') !== false)->andWhere('multiple')->eq('1')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()