* finish task#819.
This commit is contained in:
@@ -244,6 +244,7 @@ $lang->bug->report->select = 'Select';
|
||||
$lang->bug->report->create = 'Create';
|
||||
|
||||
$lang->bug->report->charts['bugsPerProject'] = 'Project bugs';
|
||||
$lang->bug->report->charts['bugsPerBuild'] = 'Build bugs';
|
||||
$lang->bug->report->charts['bugsPerModule'] = 'Module bugs';
|
||||
$lang->bug->report->charts['openedBugsPerDay'] = 'Opened bugs per day';
|
||||
$lang->bug->report->charts['resolvedBugsPerDay'] = 'Resolved bugs per day';
|
||||
@@ -274,6 +275,7 @@ $lang->bug->report->options->graph->pieRadius = 100;
|
||||
$lang->bug->report->options->graph->showColumnShadow = 0;
|
||||
|
||||
$lang->bug->report->bugsPerProject->graph->xAxisName = 'Project';
|
||||
$lang->bug->report->bugsPerBuild->graph->xAxisName = 'Build';
|
||||
$lang->bug->report->bugsPerModule->graph->xAxisName = 'Module';
|
||||
|
||||
$lang->bug->report->openedBugsPerDay->swf = 'column2d';
|
||||
|
||||
@@ -244,6 +244,7 @@ $lang->bug->report->select = '请选择报表类型';
|
||||
$lang->bug->report->create = '生成报表';
|
||||
|
||||
$lang->bug->report->charts['bugsPerProject'] = '项目Bug数量';
|
||||
$lang->bug->report->charts['bugsPerBuild'] = '版本Bug数量';
|
||||
$lang->bug->report->charts['bugsPerModule'] = '模块Bug数量';
|
||||
$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug数';
|
||||
$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解决Bug数';
|
||||
@@ -274,6 +275,7 @@ $lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。
|
||||
$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。
|
||||
|
||||
$lang->bug->report->bugsPerProject->graph->xAxisName = '项目';
|
||||
$lang->bug->report->bugsPerBuild->graph->xAxisName = '版本';
|
||||
$lang->bug->report->bugsPerModule->graph->xAxisName = '模块';
|
||||
|
||||
$lang->bug->report->openedBugsPerDay->swf = 'column2d';
|
||||
|
||||
@@ -453,6 +453,47 @@ class bugModel extends model
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report data of bugs per build.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getDataOfBugsPerBuild()
|
||||
{
|
||||
$datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product);
|
||||
|
||||
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
|
||||
foreach($datas as $buildIDList => $data)
|
||||
{
|
||||
$openBuildIDList = explode(',', $buildIDList);
|
||||
if(count($openBuildIDList) > 1)
|
||||
{
|
||||
foreach($openBuildIDList as $buildID)
|
||||
{
|
||||
if(isset($datas[$buildID]))
|
||||
{
|
||||
$datas[$buildID]->value++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$datas[$buildID]->name = $buildID;
|
||||
$datas[$buildID]->value = 1;
|
||||
}
|
||||
}
|
||||
unset($datas[$buildIDList]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($datas as $buildID => $data)
|
||||
{
|
||||
$data->name = isset($builds[$buildID]) ? $builds[$buildID] : $this->lang->report->undefined;
|
||||
}
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report data of bugs per module
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user