From faafd463010158b6902e8839db6df08d583950ec Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 3 Jul 2012 01:00:09 +0000 Subject: [PATCH] * change display of workload report. --- module/report/lang/en.php | 2 ++ module/report/lang/zh-cn.php | 2 ++ module/report/model.php | 3 +++ module/report/view/workload.html.php | 30 ++++++++++------------------ 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/module/report/lang/en.php b/module/report/lang/en.php index 41bab0cea8..fa40d4bad4 100644 --- a/module/report/lang/en.php +++ b/module/report/lang/en.php @@ -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 = 'Try pro version for more!'; diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php index 24f5a03653..d6e350a423 100644 --- a/module/report/lang/zh-cn.php +++ b/module/report/lang/zh-cn.php @@ -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 = '更多精彩,尽在专业版!'; diff --git a/module/report/model.php b/module/report/model.php index 8cf74e80cb..6b6e8acf7d 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -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; } } } diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index f9a134c245..88aa10b979 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -49,9 +49,9 @@ report->taskTotal, $taskCount, $taskHour); ?> @@ -60,13 +60,8 @@ report->bugTotal, $bugCount); ?> @@ -78,13 +73,9 @@ report->taskTotal, $taskCount, $taskHour); ?> @@ -93,9 +84,8 @@ report->bugTotal, $bugCount); ?>