diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index c9e30f2906..b8f26ebbe6 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -12,7 +12,6 @@ ?> -
| idAB);?> | -priAB);?> | -task->name);?> | -statusAB);?> | -task->deadlineAB);?> | +idAB);?> | +priAB);?> | +task->name);?> | +statusAB);?> | +task->deadlineAB);?> | cookie->windowWidth > $this->config->wideSize):?> -task->openedDateAB);?> | +task->openedDateAB);?> | -task->assignedToAB);?> | -task->finishedByAB);?> | +task->assignedToAB);?> | +task->finishedByAB);?> | cookie->windowWidth > $this->config->wideSize):?> -task->finishedDateAB);?> | +task->finishedDateAB);?> | -task->estimateAB);?> | -task->consumedAB);?> | -task->leftAB);?> | - type == 'sprint') print '' and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print ' | ';?> +task->estimateAB);?> | +task->consumedAB);?> | +task->leftAB);?> | +task->progess;?> | + type == 'sprint') print "" and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print ' | ';?>actions;?> | estimate;?> | consumed;?> | left;?> | +progess;?>% | type == 'sprint') { diff --git a/module/task/lang/en.php b/module/task/lang/en.php index b8bc32b52a..eb9230cbee 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -33,6 +33,7 @@ $lang->task->reportChart = "Report Chart"; $lang->task->fromBug = 'From Bug'; $lang->task->case = 'Related Case'; $lang->task->confirmStoryChange = "Confirm Story Change"; +$lang->task->progess = 'Progess'; $lang->task->common = 'Task'; $lang->task->id = 'ID'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 687ad4eb47..81b051ca07 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -33,6 +33,7 @@ $lang->task->reportChart = "报表统计"; $lang->task->fromBug = '来源Bug'; $lang->task->case = '相关用例'; $lang->task->confirmStoryChange = "确认需求变动"; +$lang->task->progess = '进度'; $lang->task->common = '任务'; $lang->task->id = '编号'; diff --git a/module/task/model.php b/module/task/model.php index 5fb1e19827..22f646195a 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1190,6 +1190,20 @@ class taskModel extends model $task->productType = $product->type; } + /* Compute task progess. */ + if($task->consumed == 0 and $task->left == 0) + { + $task->progess = 0; + } + elseif($task->consumed != 0 and $task->left == 0) + { + $task->progess = 100; + } + else + { + $task->progess = round($task->consumed / ($task->consumed + $task->left), 3) * 100; + } + return $task; }
|---|