* Fix task bug
This commit is contained in:
@@ -1834,18 +1834,19 @@ class projectModel extends model
|
||||
{
|
||||
$taskSum = $statusWait = $statusDone = $statusDoing = $statusClosed = $statusCancel = $statusPause = 0;
|
||||
$totalEstimate = $totalConsumed = $totalLeft = 0.0;
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if(!empty($task->parent)) continue;
|
||||
|
||||
$totalEstimate += $task->estimate;
|
||||
$totalConsumed += $task->consumed;
|
||||
$totalLeft += (($task->status == 'cancel' or $task->closedReason == 'cancel') ? 0 : $task->left);
|
||||
$statusVar = 'status' . ucfirst($task->status);
|
||||
$$statusVar ++;
|
||||
if(!empty($task->children)) $taskSum += count($task->children);
|
||||
$taskSum ++;
|
||||
}
|
||||
|
||||
return sprintf($this->lang->project->taskSummary, count($tasks), $statusWait, $statusDoing, $totalEstimate, round($totalConsumed, 1), $totalLeft);
|
||||
return sprintf($this->lang->project->taskSummary, $taskSum, $statusWait, $statusDoing, $totalEstimate, round($totalConsumed, 1), $totalLeft);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user