* finish task #4764.

This commit is contained in:
wangyidong
2018-09-10 15:23:59 +08:00
parent 4877b2d2a9
commit 800a77fff6
20 changed files with 371 additions and 224 deletions
+1 -3
View File
@@ -138,15 +138,13 @@ class testtask extends control
/* Create testtask from testtask of test.*/
if($projectID == 0)
{
$projectList = array_keys($this->loadModel('project')->getPairs());
$params = 'nodeleted';
$projects = array();
$datas = $this->dao->select('t2.id, t2.name, t2.deleted')->from(TABLE_PROJECTPRODUCT)
->alias('t1')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.product')->eq((int)$productID)
->beginIF('0')->andWhere('t1.branch')->in('0')->fi()
->andWhere('t2.id')->in($projectList)
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
->andWhere('t2.type')->ne('ops')
->orderBy('t1.project desc')
->fetchAll();