+ complete task #325:add bugsPerAssignedTo to bug report.

This commit is contained in:
fujia
2010-11-12 06:03:44 +00:00
parent a507c99730
commit 41ffd2d5f7
3 changed files with 18 additions and 2 deletions

View File

@@ -225,6 +225,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Severity';
$lang->bug->report->charts['bugsPerResolution'] = 'Resolution';
$lang->bug->report->charts['bugsPerStatus'] = 'Status';
$lang->bug->report->charts['bugsPerType'] = 'Type';
$lang->bug->report->charts['bugsPerAssignedTo'] = 'AssignedTo';
//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计';
//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计';
@@ -267,6 +268,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Severity';
$lang->bug->report->bugsPerResolution->graph->xAxisName = 'Resolution';
$lang->bug->report->bugsPerStatus->graph->xAxisName = 'Status';
$lang->bug->report->bugsPerType->graph->xAxisName = 'Type';
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = 'AssignedTo';
$lang->bug->report->bugLiveDays->graph->xAxisName = 'Live days';
$lang->bug->report->bugHistories->graph->xAxisName = 'Histories';

View File

@@ -225,6 +225,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计';
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计';
$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计';
$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计';
$lang->bug->report->charts['bugsPerAssignedTo'] = '指派给统计';
//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计';
//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计';
@@ -267,6 +268,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度';
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案';
$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态';
$lang->bug->report->bugsPerType->graph->xAxisName = '类型';
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = '指派给';
$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间';
$lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';

View File

@@ -409,8 +409,20 @@ class bugModel extends model
foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type];
return $datas;
}
/* 按assignedTo统计。*/
public function getDataOfBugsPerAssignedTo()
{
$datas = $this->dao->select('assignedTo AS name, COUNT(*) AS value')
->from(TABLE_BUG)->where($this->session->bugReportCondition)
->groupBy('name')
->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
return $datas;
}
/* 合并公共的chart设置和当前chart的设置。*/
public function mergeChartOption($chartType)
{