* Finish task#38911.
This commit is contained in:
@@ -244,7 +244,7 @@ class testtask extends control
|
||||
$executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
|
||||
|
||||
$testreports = empty($build) ? array() : $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where('builds')->like('%' . $build . '%')->fetchPairs('id','title');
|
||||
$testreports = $this->testtask->getTestReportPairsByBuild($build);
|
||||
|
||||
/* Set menu. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
@@ -750,7 +750,7 @@ class testtask extends control
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
|
||||
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
|
||||
$testreports = $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where('builds')->like('%' . $task->build . '%')->fetchPairs('id','title');
|
||||
$testreports = $this->testtask->getTestReportPairsByBuild($task->build);
|
||||
|
||||
$this->view->task = $task;
|
||||
$this->view->executions = $executions;
|
||||
@@ -1451,7 +1451,7 @@ class testtask extends control
|
||||
public function ajaxGetTestReports($buildID)
|
||||
{
|
||||
/* Testreport list. */
|
||||
$pairs = $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where('builds')->like('%' . $buildID . '%')->fetchPairs('id','title');
|
||||
$pairs = $this->testtask->getTestReportPairsByBuild($buildID);
|
||||
die(html::select('testreport', $pairs, '', "class='form-control chosen'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,6 +492,20 @@ class testtaskModel extends model
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get test report pairs by build.
|
||||
*
|
||||
* @param string $build
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTestReportPairsByBuild($build = '')
|
||||
{
|
||||
if(empty($build)) return array();
|
||||
|
||||
return $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where("CONCAT(',', builds, ',')")->like("%,$build,%")->fetchPairs('id','title');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get related test tasks.
|
||||
*
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testtask->build;?></th>
|
||||
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $task->build, "class='form-control chosen'");?></span></td>
|
||||
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $task->build, "class='form-control chosen' onchange='loadTestReports(this.value)'");?></span></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user