diff --git a/db/update18.8.sql b/db/update18.8.sql index a11b288cad..067f31616f 100644 --- a/db/update18.8.sql +++ b/db/update18.8.sql @@ -1 +1,3 @@ ALTER TABLE `zt_mr` ADD executionID mediumint(8) unsigned NOT NULL DEFAULT 0 AFTER `jobID`; +ALTER TABLE `zt_testtask` ADD COLUMN `members` text NULL; +UPDATE `zt_solutions` SET `deleted` = '0' WHERE `deleted` = ''; diff --git a/lib/base/dao/dao.class.php b/lib/base/dao/dao.class.php index 476746283f..1b6dde94dd 100644 --- a/lib/base/dao/dao.class.php +++ b/lib/base/dao/dao.class.php @@ -1578,6 +1578,24 @@ class baseSQL */ public $conditionIsTrue = false; + /** + * 条件层级。 + * The condition level. + * + * @var bool + * @access public; + */ + public $conditionLevel = 0; + + /** + * 条件结果,beginIF 中表达式的结果会存储到这个数组中。 + * Store the result of the expression. + * + * @var bool + * @access public; + */ + public $conditionResults = array(); + /** * WHERE条件嵌套小括号标记。 * If in mark or not. @@ -1889,7 +1907,9 @@ class baseSQL public function beginIF($condition) { $this->inCondition = true; - $this->conditionIsTrue = $condition; + $this->conditionLevel += 1; + $this->conditionResults[$this->conditionLevel] = $condition; + $this->conditionIsTrue = !in_array(false, $this->conditionResults); return $this; } @@ -1902,6 +1922,14 @@ class baseSQL */ public function fi() { + unset($this->conditionResults[$this->conditionLevel]); + $this->conditionLevel -= 1; + if($this->conditionLevel > 0) + { + $this->conditionIsTrue = !in_array(false, $this->conditionResults); + return $this; + } + $this->inCondition = false; $this->conditionIsTrue = false; return $this; diff --git a/module/block/control.php b/module/block/control.php index b91a1fa924..943a9e19dc 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -980,12 +980,14 @@ class block extends control $this->app->loadLang('story'); $this->app->loadLang('bug'); + $this->loadModel('program')->refreshStats(); + /* Set project status and count. */ $status = isset($this->params->type) ? $this->params->type : 'all'; $count = isset($this->params->count) ? (int)$this->params->count : 15; /* Get projects. */ - $projects = $this->project->getOverviewList('byStatus', $status, 'order_asc', $count, ''); + $projects = $this->project->getOverviewList('byStatus', $status, 'order_asc', $count, ''); if(empty($projects)) { $this->view->projects = $projects; @@ -1031,7 +1033,6 @@ class block extends control $project->cv = $this->weekly->getCV($project->ev, $project->ac); $left = (float)$this->weekly->getLeft($project->id, $today); - $project->progress = ($project->ac + $left) ? floor($project->ac / ($project->ac + $left) * 1000) / 1000 * 100 : 0; $project->progress = $project->progress > 100 ? 100 : $project->progress; $project->current = $current; } @@ -1282,6 +1283,9 @@ class block extends control public function printWaterfallReportBlock() { $this->app->loadLang('programplan'); + + $this->loadModel('program')->refreshStats(); + $project = $this->loadModel('project')->getByID($this->session->project); $today = helper::today(); $date = date('Ymd', strtotime('this week Monday')); @@ -1298,9 +1302,8 @@ class block extends control $this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv); $this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac); - $left = (float)$this->weekly->getLeft($this->session->project, $today); - $progress = ($this->view->ac + $left) ? floor($this->view->ac / ($this->view->ac + $left) * 1000) / 1000 * 100 : 0; - $this->view->progress = $progress > 100 ? 100 : $progress; + $left = (float)$this->weekly->getLeft($this->session->project, $today); + $this->view->progress = $project->progress > 100 ? 100 : $project->progress; $this->view->current = $current; } diff --git a/module/block/view/recentprojectblock.html.php b/module/block/view/recentprojectblock.html.php index cd3e14a250..c61426f361 100644 --- a/module/block/view/recentprojectblock.html.php +++ b/module/block/view/recentprojectblock.html.php @@ -101,7 +101,7 @@
|
- model == 'waterfall' ? $this->project->getWaterfallProgress($project->id) : (((float)$workhour->totalConsumed + (float)$workhour->totalLeft) ? floor($workhour->totalConsumed / ((float)$workhour->totalConsumed + (float)$workhour->totalLeft) * 1000) / 1000 * 100 : 0);?>
- project->progress;?> percent;?>
+ project->progress;?> progress . $lang->percent;?>
-
+
|
testtask->execution);?> | statusAB);?> | testtask->owner);?> | +testtask->members);?> | testtask->begin);?> | testtask->end);?> | owner);?> | + + members) as $member) $members[] = zget($users, $member);?> + +begin?> | end?> | " . $this->loadModel('flow')->getFieldValue($extendField, $task) . "";?> diff --git a/module/testtask/view/create.html.php b/module/testtask/view/create.html.php index 2360aecfa9..6c47bc9d5a 100644 --- a/module/testtask/view/create.html.php +++ b/module/testtask/view/create.html.php @@ -73,6 +73,10 @@ +
|---|---|---|---|
| testtask->members;?> | ++ | ||
| testtask->begin;?> | diff --git a/module/testtask/view/edit.html.php b/module/testtask/view/edit.html.php index 670e466275..d138517023 100644 --- a/module/testtask/view/edit.html.php +++ b/module/testtask/view/edit.html.php @@ -56,6 +56,12 @@ | ||
| testtask->members;?> | ++ members, "class='form-control picker-select' multiple");?> + | +||
| testtask->begin;?> |
diff --git a/module/transfer/control.php b/module/transfer/control.php
index c6e3f0b892..51f45e797d 100755
--- a/module/transfer/control.php
+++ b/module/transfer/control.php
@@ -152,6 +152,11 @@ class transfer extends control
{
$filter = '';
if($model == 'task') $filter = 'estimate';
+ if($model == 'bug')
+ {
+ $this->loadModel('bug');
+ $this->config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'product', 'method' =>'getAllExecutionPairsByProduct', 'params' => '$productID&$branch');
+ }
if($model == 'story' and $this->session->storyType == 'requirement') $this->loadModel('story')->replaceUserRequirementLang();
$this->loadModel($model);
@@ -198,6 +203,7 @@ class transfer extends control
{
$this->loadModel($model);
$fields = $this->config->$model->templateFields;
+ if($model == 'bug') $this->config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'product', 'method' =>'getAllExecutionPairsByProduct', 'params' => '$productID&$branch');
if($this->config->edition != 'open')
{
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index a62cc027f0..d5dc7b36db 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -707,6 +707,11 @@ class upgradeModel extends model
$this->processHistoryDataForMetric();
$this->loadModel('metric')->updateMetricDate();
break;
+ case '18_8':
+ /* Upgrade members for testtask. */
+ $this->upgradeTesttaskMembers();
+ $this->loadModel('program')->refreshStats(true);
+ break;
}
$this->deletePatch();
@@ -9878,4 +9883,23 @@ class upgradeModel extends model
}
$this->dao->commit();
}
+
+ /**
+ * Upgrade testtask members.
+ *
+ * @access public
+ * @return void
+ */
+ public function upgradeTesttaskMembers()
+ {
+ $memberGroup = $this->dao->select('task,lastRunner')->from(TABLE_TESTRUN)
+ ->where('lastRunner')->ne('')
+ ->fetchGroup('task', 'lastRunner');
+
+ foreach($memberGroup as $taskID => $members)
+ {
+ $members = implode(',', array_keys($members));
+ $this->dao->update(TABLE_TESTTASK)->set('members')->eq($members)->where('id')->eq($taskID)->exec();
+ }
+ }
}
diff --git a/module/weekly/lang/de.php b/module/weekly/lang/de.php
index 459e38dc3c..940594866d 100644
--- a/module/weekly/lang/de.php
+++ b/module/weekly/lang/de.php
@@ -90,15 +90,15 @@ EOD;
$lang->weekly->blockHelpNotice = << 1) Progress of this week=total consumed man hours/(total consumed man hours+remaining man hours) + 1) Project progress = consumed task hours / (consumed task hours + remaining task hours) * 100% Statistical range: -1) The total consumed man hours include task, demand, bug, use case, version, test sheet, problem, risk, document and review time -2) To avoid repeated calculation, the task only contains child tasks, not parent tasks - 3) Including deleted tasks, requirements, bugs, use cases, versions, test sheets, problems, risks, documents, and consumed man hours in reviews - 4) This includes the work hours consumed by deleted tasks, requirements, bugs, use cases, versions, test sheets, and documents - 5) Including work hours consumed by cancelled tasks, problems and risks - 6) Exclude remaining work on canceled tasks - 7) Exclude remaining work for deleted tasks in progress +1) Only the working hour consumption data of the task is counted + 2) To avoid repeated calculation, the task working hours only include child tasks, not parent tasks + 3) Including the working hours consumed by canceled tasks + 4) Excluding the working hours consumed in deleted tasks + 5) Excluding the working hours consumed in deleted tasks in progress + 6) Excluding the remaining working hours of canceled tasks + 7) Excluding the remaining working hours of deleted tasks in progress PV Planned ValueCalculation method:1) The estimated start date and end date of the task are within the range of the start and end dates of this week, and the estimated work hours are accumulated diff --git a/module/weekly/lang/en.php b/module/weekly/lang/en.php index 459e38dc3c..940594866d 100644 --- a/module/weekly/lang/en.php +++ b/module/weekly/lang/en.php @@ -90,15 +90,15 @@ EOD; $lang->weekly->blockHelpNotice = << 1) Progress of this week=total consumed man hours/(total consumed man hours+remaining man hours) + 1) Project progress = consumed task hours / (consumed task hours + remaining task hours) * 100% Statistical range: -1) The total consumed man hours include task, demand, bug, use case, version, test sheet, problem, risk, document and review time -2) To avoid repeated calculation, the task only contains child tasks, not parent tasks - 3) Including deleted tasks, requirements, bugs, use cases, versions, test sheets, problems, risks, documents, and consumed man hours in reviews - 4) This includes the work hours consumed by deleted tasks, requirements, bugs, use cases, versions, test sheets, and documents - 5) Including work hours consumed by cancelled tasks, problems and risks - 6) Exclude remaining work on canceled tasks - 7) Exclude remaining work for deleted tasks in progress +1) Only the working hour consumption data of the task is counted + 2) To avoid repeated calculation, the task working hours only include child tasks, not parent tasks + 3) Including the working hours consumed by canceled tasks + 4) Excluding the working hours consumed in deleted tasks + 5) Excluding the working hours consumed in deleted tasks in progress + 6) Excluding the remaining working hours of canceled tasks + 7) Excluding the remaining working hours of deleted tasks in progress PV Planned ValueCalculation method:1) The estimated start date and end date of the task are within the range of the start and end dates of this week, and the estimated work hours are accumulated diff --git a/module/weekly/lang/fr.php b/module/weekly/lang/fr.php index 459e38dc3c..940594866d 100644 --- a/module/weekly/lang/fr.php +++ b/module/weekly/lang/fr.php @@ -90,15 +90,15 @@ EOD; $lang->weekly->blockHelpNotice = << 1) Progress of this week=total consumed man hours/(total consumed man hours+remaining man hours) + 1) Project progress = consumed task hours / (consumed task hours + remaining task hours) * 100% Statistical range: -1) The total consumed man hours include task, demand, bug, use case, version, test sheet, problem, risk, document and review time -2) To avoid repeated calculation, the task only contains child tasks, not parent tasks - 3) Including deleted tasks, requirements, bugs, use cases, versions, test sheets, problems, risks, documents, and consumed man hours in reviews - 4) This includes the work hours consumed by deleted tasks, requirements, bugs, use cases, versions, test sheets, and documents - 5) Including work hours consumed by cancelled tasks, problems and risks - 6) Exclude remaining work on canceled tasks - 7) Exclude remaining work for deleted tasks in progress +1) Only the working hour consumption data of the task is counted + 2) To avoid repeated calculation, the task working hours only include child tasks, not parent tasks + 3) Including the working hours consumed by canceled tasks + 4) Excluding the working hours consumed in deleted tasks + 5) Excluding the working hours consumed in deleted tasks in progress + 6) Excluding the remaining working hours of canceled tasks + 7) Excluding the remaining working hours of deleted tasks in progress PV Planned ValueCalculation method:1) The estimated start date and end date of the task are within the range of the start and end dates of this week, and the estimated work hours are accumulated diff --git a/module/weekly/lang/zh-cn.php b/module/weekly/lang/zh-cn.php index a5508a2bc4..aabc2de79d 100644 --- a/module/weekly/lang/zh-cn.php +++ b/module/weekly/lang/zh-cn.php @@ -90,13 +90,13 @@ EOD; $lang->weekly->blockHelpNotice = << 1)本周进度=总消耗工时/(总消耗工时+剩余工时) + 1)项目进度=已消耗任务工时 /(已消耗任务工时 + 剩余任务工时)*100% 统计范围: -1)总消耗的工时包括任务、需求、Bug、用例、版本、测试单、问题、风险、文档、评审的耗时 -2)为避免重复计算,任务只包含子任务,不包括父任务 - 3)包括已删除任务、需求、Bug、用例、版本、测试单、问题、风险、文档、评审中已消耗的工时 - 4)包括已删除执行中任务、需求、Bug、用例、版本、测试单、文档已消耗的工时 - 5)包括已取消任务、问题、风险已消耗的工时 +1)只统计任务的工时消耗数据。 + 2)为避免重复计算,任务工时只包含子任务,不包括父任务 + 3)包括已取消任务消耗的工时 + 4)不包括已删除任务中消耗的工时 + 5)不包括已删除执行中任务消耗的工时 6)不包括已取消任务的剩余工时 7)不包括已删除执行中任务的剩余工时 PV 计划完成的工作 | ||