diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index ff75aa09a4..0259ada71e 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -47,7 +47,7 @@ builder]?> id&build=$build->id", '', 'list', 'check'); + common::printIcon('testtask', 'create', "product=$build->product&project=$project->id&build=$build->id", '', 'list', 'check'); $lang->project->bug = $lang->project->viewBug; common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", '', 'list'); common::printIcon('build', 'edit', "buildID=$build->id", '', 'list'); diff --git a/module/testtask/control.php b/module/testtask/control.php index 92ade38aac..9b796f19b2 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -109,7 +109,7 @@ class testtask extends control ->andWhere('t2.deleted')->eq(0) ->fetchPairs('id'); - $productID = key($products); + $productID = $productID ? $productID : key($products); $projects = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('deleted')->eq(0)->fetchPairs('id'); $builds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->eq($build)->andWhere('deleted')->eq(0)->fetchPairs('id'); } @@ -123,7 +123,7 @@ class testtask extends control ->andWhere('t2.deleted')->eq(0) ->fetchPairs('id'); - $productID = key($products); + $productID = $productID ? $productID : key($products); $projects = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('deleted')->eq(0)->fetchPairs('id'); $builds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->fetchPairs('id'); $builds = array('trunk' => 'Trunk') + $builds; diff --git a/module/testtask/view/create.html.php b/module/testtask/view/create.html.php index 84303181ee..8be1198b4d 100644 --- a/module/testtask/view/create.html.php +++ b/module/testtask/view/create.html.php @@ -26,7 +26,7 @@ testtask->product;?> - +