+ finish the task #628.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user