* change display of workload report.

This commit is contained in:
zhujinyong
2012-07-03 01:00:09 +00:00
parent b357ac39ac
commit faafd46301
4 changed files with 17 additions and 20 deletions
+2
View File
@@ -58,5 +58,7 @@ $lang->report->devTestRate = 'Dev/Test';
$lang->report->details = 'Details';
$lang->report->total = 'Total';
$lang->report->to = 'to';
$lang->report->taskTotal = "%s Tasks, %s Manhours";
$lang->report->bugTotal = "%s Bugs";
$lang->report->proVersion = '<a href="http://www.zentao.net/goto.php?item=proversion&from=reportpage" target="_blank">Try pro version for more!</a>';
+2
View File
@@ -58,5 +58,7 @@ $lang->report->devTestRate = '开发/测试';
$lang->report->details = '详情';
$lang->report->total = '总计';
$lang->report->to = '至';
$lang->report->taskTotal = "共%s个任务,需%s工时";
$lang->report->bugTotal = "共%s个Bug";
$lang->report->proVersion = '<a href="http://www.zentao.net/goto.php?item=proversion&from=reportpage" target="_blank">更多精彩,尽在专业版!</a>';
+3
View File
@@ -361,6 +361,8 @@ EOT;
{
$workload[$user]['task'][$task->projectName]['count'] = isset($workload[$user]['task'][$task->projectName]['count']) ? $workload[$user]['task'][$task->projectName]['count'] + 1 : 1;
$workload[$user]['task'][$task->projectName]['manhour'] = isset($workload[$user]['task'][$task->projectName]['manhour']) ? $workload[$user]['task'][$task->projectName]['manhour'] + $task->consumed : $task->consumed;
$workload[$user]['total']['task']['count'] = isset($workload[$user]['total']['task']['count']) ? $workload[$user]['total']['task']['count'] + 1 : 1;
$workload[$user]['total']['task']['manhour'] = isset($workload[$user]['total']['task']['manhour']) ? $workload[$user]['total']['task']['manhour'] + $task->consumed : $task->consumed;
}
}
}
@@ -371,6 +373,7 @@ EOT;
foreach($userBugs as $bug)
{
$workload[$user]['bug'][$bug->productName]['count'] = isset($workload[$user]['bug'][$bug->productName]['count']) ? $workload[$user]['bug'][$bug->productName]['count'] + 1 : 1;
$workload[$user]['total']['bug']['count'] = isset($workload[$user]['total']['bug']['count']) ? $workload[$user]['total']['bug']['count'] + 1 : 1;
}
}
}
+10 -20
View File
@@ -49,9 +49,9 @@
<?php if($i == 1):?>
<td rowspan='<?php echo count($load[$max]);?>'>
<?php
$total = 0;
foreach($load['task'] as $count) $total += $count['count'];
echo $total;
$taskCount = isset($load['total']['task']['count']) ? $load['total']['task']['count'] : 0;
$taskHour = isset($load['total']['task']['manhour']) ? $load['total']['task']['manhour'] : 0;
printf($lang->report->taskTotal, $taskCount, $taskHour);
?>
</td>
<?php endif;?>
@@ -60,13 +60,8 @@
<?php if($i == 1):?>
<td rowspan='<?php echo count($load[$max]);?>'>
<?php
$total = 0;
if(!empty($load['bug']))
{
foreach($load['bug'] as $count) $total += $count['count'];
reset($load['bug']);
}
echo $total;
$bugCount = isset($load['total']['bug']['count']) ? $load['total']['bug']['count'] : 0;
printf($lang->report->bugTotal, $bugCount);
?>
</td>
<?php endif;?>
@@ -78,13 +73,9 @@
<?php if($i == 1):?>
<td rowspan='<?php echo count($load[$max]);?>'>
<?php
$total = 0;
if(!empty($load['task']))
{
foreach($load['task'] as $count) $total += $count['count'];
reset($load['task']);
}
echo $total;
$taskCount = isset($load['total']['task']['count']) ? $load['total']['task']['count'] : 0;
$taskHour = isset($load['total']['task']['manhour']) ? $load['total']['task']['manhour'] : 0;
printf($lang->report->taskTotal, $taskCount, $taskHour);
?>
</td>
<?php endif;?>
@@ -93,9 +84,8 @@
<?php if($i == 1):?>
<td rowspan='<?php echo count($load[$max]);?>'>
<?php
$total = 0;
foreach($load['bug'] as $count) $total += $count['count'];
echo $total;
$bugCount = isset($load['total']['bug']['count']) ? $load['total']['bug']['count'] : 0;
printf($lang->report->bugTotal, $bugCount);
?>
</td>
<?php endif;?>