From befa5a2a8047c2edbe536751e1211de64937d38a Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Thu, 17 Nov 2016 14:42:06 +0800 Subject: [PATCH 1/3] * finish task #2704. --- module/bug/view/report.html.php | 1 + module/common/lang/en.php | 3 +++ module/common/lang/zh-cn.php | 3 +++ module/story/view/report.html.php | 1 + module/task/view/report.html.php | 1 + 5 files changed, 9 insertions(+) diff --git a/module/bug/view/report.html.php b/module/bug/view/report.html.php index c53ff8bd6c..1d7973e355 100644 --- a/module/bug/view/report.html.php +++ b/module/bug/view/report.html.php @@ -76,6 +76,7 @@ +
report->notice->help?>
diff --git a/module/common/lang/en.php b/module/common/lang/en.php index cb51afcc69..f7612815d5 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -275,6 +275,9 @@ $lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|p $lang->report->menu->test = array('link' => 'Testing|report|bugcreate', 'alias' => 'bugassign'); $lang->report->menu->staff = array('link' => 'Company|report|workload'); +$lang->report->notice = new stdclass(); +$lang->report->notice->help = 'Note: Report is generated from search results. Please search in the list page before you generate a report.'; + /* 组织结构视图菜单设置。*/ $lang->company = new stdclass(); $lang->company->menu = new stdclass(); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 9ceed8cdec..7bfbf3d6aa 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -275,6 +275,9 @@ $lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|p $lang->report->menu->test = array('link' => '测试|report|bugcreate', 'alias' => 'bugassign'); $lang->report->menu->staff = array('link' => '组织|report|workload'); +$lang->report->notice = new stdclass(); +$lang->report->notice->help = '注:统计报表的数据,来源于列表页面的检索结果,生成统计报表前请先在列表页面进行检索。'; + /* 组织结构视图菜单设置。*/ $lang->company = new stdclass(); $lang->company->menu = new stdclass(); diff --git a/module/story/view/report.html.php b/module/story/view/report.html.php index 2d103a310b..0c2d98603d 100644 --- a/module/story/view/report.html.php +++ b/module/story/view/report.html.php @@ -75,6 +75,7 @@ +
report->notice->help?>
diff --git a/module/task/view/report.html.php b/module/task/view/report.html.php index 3378f37436..3983630132 100644 --- a/module/task/view/report.html.php +++ b/module/task/view/report.html.php @@ -77,6 +77,7 @@ +
report->notice->help?>
From 58693b20c362c8b5ab002198b5fc5edd58c72302 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Thu, 17 Nov 2016 15:04:16 +0800 Subject: [PATCH 2/3] * finish task #2706. --- module/product/view/project.html.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/product/view/project.html.php b/module/product/view/project.html.php index a62146d26d..e284706b0f 100644 --- a/module/product/view/project.html.php +++ b/module/product/view/project.html.php @@ -14,16 +14,16 @@
product->project;?>
- +
- - - - - - - + + + + + + + From 0bcb1b5cc83270748b3942ab29e14f002e883de9 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Thu, 17 Nov 2016 17:25:16 +0800 Subject: [PATCH 3/3] * finish task #2713. --- module/product/view/browse.html.php | 1 - module/product/view/browsedata.html.php | 1 + module/project/view/taskdata.html.php | 29 ++++++++++++++----------- module/task/lang/en.php | 1 + module/task/lang/zh-cn.php | 1 + module/task/model.php | 14 ++++++++++++ 6 files changed, 33 insertions(+), 14 deletions(-) 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 @@ ?> -
project->name;?>project->code;?>project->end;?>project->status;?>project->totalEstimate;?>project->totalConsumed;?>project->totalLeft;?>project->name;?>project->code;?>project->end;?>project->status;?>project->totalEstimate;?>project->totalConsumed;?>project->totalLeft;?> project->progess;?> project->burn;?>
diff --git a/module/project/view/taskdata.html.php b/module/project/view/taskdata.html.php index de801ffbec..9a66f054d2 100644 --- a/module/project/view/taskdata.html.php +++ b/module/project/view/taskdata.html.php @@ -10,30 +10,32 @@ * @link http://www.zentao.net */ ?> +
- - - - - + + + + + cookie->windowWidth > $this->config->wideSize):?> - + - - + + cookie->windowWidth > $this->config->wideSize):?> - + - - - - type == 'sprint') print '';?> + + + + + type == 'sprint') print "';?> @@ -77,6 +79,7 @@ + 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; }
idAB);?> priAB);?> task->name);?>statusAB);?> task->deadlineAB);?> idAB);?> priAB);?> task->name);?>statusAB);?> task->deadlineAB);?> task->openedDateAB);?> task->openedDateAB);?> task->assignedToAB);?> task->finishedByAB);?> task->assignedToAB);?> task->finishedByAB);?> task->finishedDateAB);?> task->finishedDateAB);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?>' and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print ' task->estimateAB);?> task->consumedAB);?> task->leftAB);?>task->progess;?>" and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print 'actions;?>
estimate;?> consumed;?> left;?>progess;?>%