* add testtask repot for bug report.

This commit is contained in:
wangyidong
2017-03-22 11:31:14 +08:00
parent 6e5dbf8d84
commit 5b2c5c80ba
16 changed files with 118 additions and 49 deletions
+5 -4
View File
@@ -311,16 +311,17 @@ class testtask extends control
public function report($productID, $taskID, $browseType, $branchID, $moduleID)
{
$this->loadModel('report');
$this->view->charts = array();
$this->view->charts = array();
if(!empty($_POST))
{
$task = $this->testtask->getById($taskID);
$bugInfo = $this->loadModel('testreport')->getBugInfo(array($taskID => $taskID), array($productID => $productID), $task->begin, $task->end, array($task->build => $task->build));
foreach($this->post->charts as $chart)
{
$chartFunc = 'getDataOf' . $chart;
$chartData = $this->testtask->$chartFunc($taskID);
$chartOption = $this->lang->testtask->report->$chart;
$this->testtask->mergeChartOption($chart);
$chartData = isset($bugInfo[$chart]) ? $bugInfo[$chart] : $this->testtask->$chartFunc($taskID);
$chartOption = $this->testtask->mergeChartOption($chart);
$this->view->charts[$chart] = $chartOption;
$this->view->datas[$chart] = $this->report->computePercent($chartData);