* finish task#1363.
This commit is contained in:
@@ -68,6 +68,7 @@ $lang->report->to = 'to';
|
||||
$lang->report->taskTotal = "Task Total";
|
||||
$lang->report->manhourTotal = "Manhour Total";
|
||||
$lang->report->bugTotal = "%s Bugs";
|
||||
$lang->report->effectiveRate = "Effective Rate";
|
||||
$lang->report->unplanned = 'unplanned';
|
||||
|
||||
/* daily reminder. */
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->report->to = '至';
|
||||
$lang->report->taskTotal = "总任务数";
|
||||
$lang->report->manhourTotal = "总工时";
|
||||
$lang->report->bugTotal = "共%s个Bug";
|
||||
$lang->report->effectiveRate = "有效率";
|
||||
$lang->report->unplanned = '未计划';
|
||||
|
||||
/* daily reminder. */
|
||||
|
||||
@@ -402,6 +402,16 @@ EOT;
|
||||
$bugSummary[$bug->openedBy][$bug->resolution] = empty($bugSummary[$bug->openedBy][$bug->resolution]) ? 1 : $bugSummary[$bug->openedBy][$bug->resolution] + 1;
|
||||
$bugSummary[$bug->openedBy]['all'] = empty($bugSummary[$bug->openedBy]['all']) ? 1 : $bugSummary[$bug->openedBy]['all'] + 1;
|
||||
}
|
||||
|
||||
foreach($bugSummary as $account => $bug)
|
||||
{
|
||||
$effectiveRate = 0;
|
||||
if(isset($bug['fixed'])) $effectiveRate += $bug['fixed'];
|
||||
if(isset($bug['external'])) $effectiveRate += $bug['external'];
|
||||
if(isset($bug['postponed'])) $effectiveRate += $bug['postponed'];
|
||||
$bugSummary[$account]['effectiveRate'] = $bug['all'] ? ($effectiveRate / $bug['all']) : "0";
|
||||
}
|
||||
uasort($bugSummary, 'summaryCmp');
|
||||
return $bugSummary;
|
||||
}
|
||||
|
||||
@@ -562,3 +572,9 @@ EOT;
|
||||
return $todos;
|
||||
}
|
||||
}
|
||||
|
||||
function summaryCmp($pre, $next)
|
||||
{
|
||||
if($pre['effectiveRate'] == $next['effectiveRate']) return 0;
|
||||
return $pre['effectiveRate'] > $next['effectiveRate'] ? -1 : 1;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<th><?php echo $lang->bug->resolutionList['postponed'];?></th>
|
||||
<th><?php echo $lang->bug->resolutionList['willnotfix'];?></th>
|
||||
<th><?php echo $lang->bug->resolutionList['tostory'];?></th>
|
||||
<th><?php echo $lang->report->effectiveRate;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -42,6 +43,7 @@
|
||||
<td><?php echo isset($bug['postponed']) ? $bug['postponed'] : 0;?></td>
|
||||
<td><?php echo isset($bug['willnotfix']) ? $bug['willnotfix'] : 0;?></td>
|
||||
<td><?php echo isset($bug['tostory']) ? $bug['tostory'] : 0;?></td>
|
||||
<td><?php echo $bug['effectiveRate'] . '%';?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user