From c1ed944fd1e47b88704a90e3659ae7bf48d70da0 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 4 Sep 2018 16:17:04 +0800 Subject: [PATCH] * finish task #4822. --- module/block/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index 0bfb9728c6..111c0c060e 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1016,9 +1016,9 @@ class block extends control ->orderBy($orderBy) ->fetchAll('id'); - $testedBuilds = $this->dao->select('build')->from(TABLE_TESTTASK)->where('product')->in(array_keys($products))->fetchPairs(); - $builds = $this->dao->select('id, product, name, bugs')->from(TABLE_BUILD)->where('id')->in($testedBuilds)->fetchGroup('product', 'id'); - $openedBugs = $this->dao->select('id, openedBuild')->from(TABLE_BUG)->where('openedBuild')->in($testedBuilds)->fetchGroup('openedBuild', 'id'); + $testedBuilds = $this->dao->select('build')->from(TABLE_TESTTASK)->where('product')->in(array_keys($products))->andWhere('project')->ne(0)->andWhere('deleted')->eq(0)->fetchPairs(); + $builds = $this->dao->select('id, product, name, bugs')->from(TABLE_BUILD)->where('id')->in($testedBuilds)->andWhere('deleted')->eq(0)->fetchGroup('product', 'id'); + $openedBugs = $this->dao->select('id, openedBuild')->from(TABLE_BUG)->where('openedBuild')->in($testedBuilds)->andWhere('deleted')->eq(0)->fetchGroup('openedBuild', 'id'); /* Get bugs. */ $bugIDList = array();