+ finish the task #628.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-11-29 01:54:35 +00:00
parent 5b5365e243
commit 13e8d56048
6 changed files with 135 additions and 0 deletions
+22
View File
@@ -91,6 +91,7 @@ class testtask extends control
die(js::locate($this->createLink('testtask', 'browse', "productID=$productID"), 'parent'));
}
/* Create testtask from build of project.*/
if($projectID != 0 and $build != 0)
{
$products = $this->dao->select('t2.id, t2.name')
@@ -110,6 +111,27 @@ class testtask extends control
$builds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->eq($build)->fetchPairs('id');
}
/* Create testtask from testtask of project.*/
if($projectID != 0 and $build == 0)
{
$products = $this->dao->select('t2.id, t2.name')
->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')
->on('t1.product = t2.id')
->where('t1.project')->eq($projectID)
->fetchPairs('id');
foreach($products as $key => $value)
{
$productID = $key;
break;
}
$projects = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetchPairs('id');
$builds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('project')->eq($projectID)->fetchPairs('id');
}
/* Create testtask from testtask of test.*/
if($projectID == 0)
{
$projects = $this->product->getProjectPairs($productID, $params = 'nodeleted');