diff --git a/db/update15.0.3.sql b/db/update15.0.3.sql
index c63491fc32..98d31b98e6 100644
--- a/db/update15.0.3.sql
+++ b/db/update15.0.3.sql
@@ -2,3 +2,4 @@ UPDATE `zt_block` SET `source`='execution' WHERE `source`='project' and `block`=
ALTER TABLE `zt_story` MODIFY COLUMN `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass');
+ALTER TABLE `zt_storyestimate` MODIFY COLUMN `average` float NOT NULL;
diff --git a/db/zentao.sql b/db/zentao.sql
index 37f7339124..328e3bcce9 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -943,7 +943,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyestimate` (
`story` mediumint(9) NOT NULL,
`round` smallint(6) NOT NULL,
`estimate` text NOT NULL,
- `average` float(10,2) NOT NULL,
+ `average` float NOT NULL,
`openedBy` varchar(30) NOT NULL,
`openedDate` datetime NOT NULL,
UNIQUE KEY `story` (`story`,`round`)
diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php
index 2e2107aefa..1cdbc98c1e 100644
--- a/module/common/lang/menu.php
+++ b/module/common/lang/menu.php
@@ -225,8 +225,9 @@ $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->
/* Execution menu. */
$lang->execution->homeMenu = new stdclass();
-if($config->systemMode == 'new') $lang->execution->homeMenu->index = "$lang->dashboard|execution|index|";
-$lang->execution->homeMenu->list = array('link' => "{$lang->execution->list}|execution|all|", 'alias' => 'create,batchedit');
+//if($config->systemMode == 'new') $lang->execution->homeMenu->index = "$lang->dashboard|execution|index|";
+//$lang->execution->homeMenu->list = array('link' => "{$lang->execution->list}|execution|all|", 'alias' => 'create,batchedit');
+$lang->execution->homeMenu->executionkanban = array('link' => "{$lang->execution->executionKanban}|execution|executionkanban|");
$lang->execution->menu = new stdclass();
$lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 911531ff6a..c6d539fc1f 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -209,7 +209,7 @@ $lang->my->work = '待处理';
$lang->project->list = '项目列表';
-$lang->execution->list = "{$lang->executionCommon}列表";
+$lang->execution->executionKanban = "{$lang->execution->common}看板";
$lang->doc->recent = '最近文档';
$lang->doc->my = '我的文档';
diff --git a/module/common/model.php b/module/common/model.php
index 812c1007cd..f7890da9ca 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -543,7 +543,7 @@ class commonModel extends model
{
$nav = $lang->mainNav->$openApp;
list($title, $currentModule, $currentMethod, $vars) = explode('|', $nav);
- if($openApp == 'execution') $currentMethod = 'all';
+ if($openApp == 'execution') $currentMethod = 'executionKanban';
}
else
{
@@ -553,7 +553,7 @@ class commonModel extends model
}
if($config->systemMode == 'classic' and $openApp == 'execution') $icon = zget($lang->navIcons, 'project', '');
- $link = ($openApp != 'execution' or ($config->systemMode == 'classic')) ? helper::createLink($currentModule, $currentMethod) : '';
+ $link = helper::createLink($currentModule, $currentMethod);
$html = $link ? html::a($link, "$icon {$lang->$openApp->common}", '', "class='btn'") : "$icon {$lang->$openApp->common}";
echo "
';
diff --git a/module/execution/control.php b/module/execution/control.php
index f31cb305a6..f51727a1cc 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -1861,6 +1861,17 @@ class execution extends control
$this->display();
}
+ /**
+ * Execution kanban.
+ *
+ * @access public
+ * @return void
+ */
+ public function executionKanban()
+ {
+ $this->display();
+ }
+
/**
* Tree view.
* Product
diff --git a/module/execution/view/storyestimate.html.php b/module/execution/view/storyestimate.html.php
index 6dd16183d4..1ca8f19b73 100644
--- a/module/execution/view/storyestimate.html.php
+++ b/module/execution/view/storyestimate.html.php
@@ -54,7 +54,7 @@
account);?> |
account, "class='form-control'");?>
estimate)):?>
- estimate->{$user->account}) ? $estimateInfo->estimate->{$user->account}->estimate : '';?> |
+ estimate->{$user->account}) ? $estimateInfo->estimate->{$user->account}->estimate : '';?> |
|
|
diff --git a/module/story/lang/de.php b/module/story/lang/de.php
index 751c3af05a..348c408596 100644
--- a/module/story/lang/de.php
+++ b/module/story/lang/de.php
@@ -273,6 +273,7 @@ $lang->story->cannotDeleteParent = "Can not delete parent {$lang->SRCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->SRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->SRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->estimateMustBeNumber = 'Estimate value must be number.';
+$lang->story->estimateMustBePlus = 'Estimated value cannot be negative';
$lang->story->form = new stdclass();
$lang->story->form->area = 'Story Bereich';
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index 2c5e68815b..032cda7943 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -274,6 +274,7 @@ $lang->story->cannotDeleteParent = "Can not delete parent {$lang->SRCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->SRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->SRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->estimateMustBeNumber = 'Estimate value must be number.';
+$lang->story->estimateMustBePlus = 'Estimated value cannot be negative';
$lang->story->form = new stdclass();
$lang->story->form->area = 'Scope';
diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php
index 02881e23a9..3fd4837161 100644
--- a/module/story/lang/fr.php
+++ b/module/story/lang/fr.php
@@ -273,6 +273,7 @@ $lang->story->cannotDeleteParent = "Impossible de supprimer {$lang->SRCommon}
$lang->story->moveChildrenTips = "Its Child {$lang->SRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->SRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->estimateMustBeNumber = 'Estimate value must be number.';
+$lang->story->estimateMustBePlus = 'Estimated value cannot be negative';
$lang->story->form = new stdclass();
$lang->story->form->area = 'Périmètre';
diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php
index 84ff7ead1e..bc789c88cd 100644
--- a/module/story/lang/vi.php
+++ b/module/story/lang/vi.php
@@ -273,6 +273,7 @@ $lang->story->cannotDeleteParent = "Không thể xóa {$lang->SRCommon} mẹ";
$lang->story->moveChildrenTips = "Its Child {$lang->SRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->SRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->estimateMustBeNumber = 'Estimate value must be number.';
+$lang->story->estimateMustBePlus = 'Estimated value cannot be negative';
$lang->story->form = new stdclass();
$lang->story->form->area = 'Phạm vi';
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index c32023f07a..e4629a5735 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -274,6 +274,7 @@ $lang->story->cannotDeleteParent = "不能删除父{$lang->SRCommon}";
$lang->story->moveChildrenTips = "修改父{$lang->SRCommon}的所属产品会将其下的子{$lang->SRCommon}也移动到所选产品下。";
$lang->story->changeTips = '该软件需求关联的用户需求有变更,点击“不变更”忽略此条变更,点击“变更”来进行该软件需求的变更。';
$lang->story->estimateMustBeNumber = '估算值必须是数字';
+$lang->story->estimateMustBePlus = '估算值不能是负数';
$lang->story->form = new stdclass();
$lang->story->form->area = "该{$lang->SRCommon}所属范围";
diff --git a/module/story/model.php b/module/story/model.php
index 55884b3f45..e49ffb1e7f 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -4159,7 +4159,13 @@ class storyModel extends model
dao::$errors[] = $this->lang->story->estimateMustBeNumber;
return false;
}
- $estimates[$account]['estimate'] = $data->estimate[$key];
+
+ if(!empty($data->estimate[$key]) and $data->estimate[$key] < 0)
+ {
+ dao::$errors[] = $this->lang->story->estimateMustBePlus;
+ return false;
+ }
+ $estimates[$account]['estimate'] = strpos($data->estimate[$key], '-') !== false ? (int)$data->estimate[$key] : (float)$data->estimate[$key];
}