bug->mySelects[$browseType]) && in_array($brow
?>
-
-
-
-
- -
- " . html::a($this->createLink('bug', 'browse', "productID=0"), $lang->product->all) . "";
- foreach($projectProducts as $product)
- {
- echo "
- " . html::a($this->createLink('bug', 'browse', "productID=$product->id&branch=0"), $product->name, '', "title='{$product->name}' class='text-ellipsis'") . " "; - } - ?> -
-
- createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("bugModule")';
- echo html::a($removeLink, "", '', "class='text-muted btn btn-link' style='padding-left: 0;'");
- }
- ?>
-
-
moduleName, $this->methodName);
foreach($menus as $menuItem)
diff --git a/module/caselib/model.php b/module/caselib/model.php
index bac5397693..2a5398c576 100644
--- a/module/caselib/model.php
+++ b/module/caselib/model.php
@@ -103,6 +103,7 @@ class caselibModel extends model
{
if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('caselib', $key, $libID);
$replace = $libID;
+ if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->caselib->menu, $key, $replace);
}
diff --git a/module/common/lang/de.php b/module/common/lang/de.php
index 95b0ab1dfe..46d50c6725 100644
--- a/module/common/lang/de.php
+++ b/module/common/lang/de.php
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
$lang->program->viewMenu = new stdclass();
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
-$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
+$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
$lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
-$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
+$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index ed7e32eee7..ecf6c9644d 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,other,';
$lang->program->viewMenu = new stdclass();
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
-$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
+$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
$lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
-$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
+$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php
index 6afeb01079..77ecb2d28e 100644
--- a/module/common/lang/fr.php
+++ b/module/common/lang/fr.php
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
$lang->program->viewMenu = new stdclass();
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
-$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
+$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
$lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
-$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
+$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php
index 2d848ef3ff..5495f24549 100644
--- a/module/common/lang/vi.php
+++ b/module/common/lang/vi.php
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
$lang->program->viewMenu = new stdclass();
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
-$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
+$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
$lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
-$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
+$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index b3692e0db3..35e0d93e50 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
$lang->program->viewMenu = new stdclass();
$lang->program->viewMenu->product = array('link' => '产品|program|product|program=%s', 'alias' => 'view');
$lang->program->viewMenu->project = array('link' => "项目|program|project|program=%s");
-$lang->program->viewMenu->personnel = array('link' => "人员|personnel|putinto|program=%s");
+$lang->program->viewMenu->personnel = array('link' => "人员|personnel|invest|program=%s");
$lang->program->viewMenu->stakeholder = array('link' => "干系人|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
$lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
-$lang->personnel->menu->putinto = array('link' => "投入人员|personnel|putinto|program=%s");
+$lang->personnel->menu->invest = array('link' => "投入人员|personnel|invest|program=%s");
$lang->personnel->menu->accessible = array('link' => "可访问人员|personnel|accessible|program=%s");
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
@@ -335,32 +335,39 @@ $lang->story->menu = $lang->product->menu;
/* 执行视图菜单设置。*/
$lang->execution = new stdclass();
+$lang->execution->homeMenu = new stdclass();
+$lang->execution->homeMenu->index = '仪表盘|execution|index|';
+$lang->execution->homeMenu->list = '执行|execution|all|';
+
$lang->execution->menu = new stdclass();
-$lang->execution->menu->index = '仪表盘|execution|index|';
-$lang->execution->menu->list = '执行|execution|all|';
+$lang->execution->menu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
+$lang->execution->menu->kanban = array('link' => '看板|execution|kanban|executionID=%s');
+$lang->execution->menu->burn = array('link' => '燃尽图|execution|burn|executionID=%s');
+$lang->execution->menu->view = array('link' => '视图|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
+$lang->execution->menu->story = array('link' => "{$lang->SRCommon}|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
+$lang->execution->menu->qa = array('link' => '测试|execution|qa|', 'alias' => 'qa,bug,testcase,testtask,testreport');
+$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
+$lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
+$lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s');
+$lang->execution->menu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
$lang->execution->viewMenu = new stdclass();
-$lang->execution->viewMenu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
-$lang->execution->viewMenu->kanban = array('link' => '看板|execution|kanban|executionID=%s');
-$lang->execution->viewMenu->burn = array('link' => '燃尽图|execution|burn|executionID=%s');
-$lang->execution->viewMenu->view = array('link' => '视图|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
-$lang->execution->viewMenu->story = array('link' => "{$lang->SRCommon}|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
-$lang->execution->viewMenu->qa = array('link' => '测试|qa|index|');
-$lang->execution->viewMenu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
-$lang->execution->viewMenu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
-$lang->execution->viewMenu->action = array('link' => '动态|execution|dynamic|executionID=%s');
-$lang->execution->viewMenu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit', 'class' => 'dropdown dropdown-hover');
+$lang->execution->viewMenu->groupTask = '分组视图|execution|grouptask|executionID=%s';
+$lang->execution->viewMenu->tree = '树状图|execution|tree|executionID=%s';
-$lang->execution->groupMenu = new stdclass();
-$lang->execution->groupMenu->groupTask = '分组视图|execution|grouptask|executionID={EXECUTION}';
-$lang->execution->groupMenu->tree = '树状图|execution|tree|executionID={EXECUTION}';
+$lang->execution->qaMenu = new stdclass();
+$lang->execution->qaMenu->qa = array('link' => '仪表盘|execution|qa|executionID=%s');
+$lang->execution->qaMenu->bug = array('link' => 'Bug|execution|bug|executionID=%s');
+$lang->execution->qaMenu->testcase = array('link' => '用例|execution|testcase|executionID=%s');
+$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
+$lang->execution->qaMenu->testreport = array('link' => '报告|execution|testreport|exeutionID=%s');
-$lang->execution->subMenu = new stdclass();
-$lang->execution->subMenu->setting = new stdclass();
-$lang->execution->subMenu->setting->vie = array('link' => '概况|execution|view|executionID=%s', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
-$lang->execution->subMenu->setting->product = $lang->productCommon . '|execution|manageproducts|executionID=%s';
-$lang->execution->subMenu->setting->team = array('link' => '团队|execution|team|executionID=%s', 'alias' => 'managemembers');
-$lang->execution->subMenu->setting->whitelist = array('link' => '白名单|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist');
+$lang->execution->settingMenu = new stdclass();
+$lang->execution->settingMenu = new stdclass();
+$lang->execution->settingMenu->view = array('link' => '概况|execution|view|executionID={EXECUTION}', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
+$lang->execution->settingMenu->products = $lang->productCommon . '|execution|manageproducts|executionID={EXECUTION}';
+$lang->execution->settingMenu->team = array('link' => '团队|execution|team|executionID={EXECUTION}', 'alias' => 'managemembers');
+$lang->execution->settingMenu->whitelist = array('link' => '白名单|execution|whitelist|executionID={EXECUTION}', 'subModule' => 'personnel', 'alias' => 'addwhitelist');
$lang->execution->dividerMenu = ',story,build,setting,';
@@ -381,9 +388,9 @@ $lang->qa->menu->automation = array('link' => '自动化|automation|browse|produ
$lang->qa->subMenu = new stdclass();
$lang->qa->subMenu->testcase = new stdclass();
-$lang->qa->subMenu->testcase->feature = array('link' => '功能测试|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story');
+$lang->qa->subMenu->testcase->feature = array('link' => '功能测试|testcase|browse|productID=%s', 'subModule' => 'testcase,tree,story');
$lang->qa->subMenu->testcase->unit = array('link' => '单元测试|testtask|browseUnits|productID=%s', 'alias' => 'browseunits');
-$lang->qa->subMenu->testcase->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
+$lang->qa->subMenu->testcase->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'subModule' => 'testsuite');
$lang->qa->subMenu->testcase->caselib = array('link' => '用例库|caselib|browse|libID=0');
$lang->qa->subMenu->testtask = new stdclass();
@@ -895,13 +902,25 @@ $lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}'
$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}&from=project";
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'alias' => 'story,track');
$lang->menu->scrum->doc = '文档|doc|index|';
-$lang->menu->scrum->qa = '测试|qa|index';
+$lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask');
$lang->menu->scrum->ci = '代码|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse|project={PROJECT}');
$lang->menu->scrum->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
+$lang->projectQa = new stdclass();
+$lang->projectQa->menu = new stdclass();
+$lang->projectQa->menu->index = array('link' => '仪表盘|qa|index');
+$lang->projectQa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'subModule' => 'bug');
+$lang->projectQa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite,testcase,caselib');
+$lang->projectQa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
+
+$lang->projectQa->subMenu = new stdclass();
+$lang->projectQa->subMenu->testtask = new stdclass();
+$lang->projectQa->subMenu->testtask->testtask = array('link' => '测试单|testtask|browse|productID=%s');
+$lang->projectQa->subMenu->testtask->report = array('link' => '报告|testreport|browse|productID=%s');
+
$lang->scrum = new stdclass();
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => '概况|project|view|project={PROJECT}', 'alias' => 'edit');
diff --git a/module/common/lang/zh-tw.php b/module/common/lang/zh-tw.php
index 21fefcf656..93208c2619 100644
--- a/module/common/lang/zh-tw.php
+++ b/module/common/lang/zh-tw.php
@@ -186,7 +186,7 @@ $lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
$lang->personnel->menu->accessible = array('link' => "可訪問人員|personnel|accessible|program=%s");
$lang->personnel->menu->whitelist = array('link' => "白名單|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
-$lang->personnel->menu->putinto = array('link' => "投入人員|personnel|putinto|program=%s");
+$lang->personnel->menu->invest = array('link' => "投入人員|personnel|invest|program=%s");
/* Scrum menu. */
$lang->product = new stdclass();
diff --git a/module/common/model.php b/module/common/model.php
index 44207d1707..801d0503d3 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -774,7 +774,7 @@ class commonModel extends model
if($moduleName == 'admin') return;
if($group == 'repo' || $group == 'ops' || $group == 'feedback') return;
if($group == 'my') self::getMyModuleMenu($moduleName, $methodName);
- if($group == 'project') self::getProgramModuleMenu($moduleName, $methodName);
+ if($group == 'project') self::getProjectModuleMenu($moduleName, $methodName);
if($group == 'product')
{
$lang->product->menu = $lang->product->setMenu;
@@ -782,7 +782,9 @@ class commonModel extends model
}
if($group == 'execution')
{
- if($methodName == 'grouptask' or $methodName == 'tree') $lang->execution->menu = self::processMenuVars($lang->execution->groupMenu);
+ if(in_array($methodName, array('grouptask', 'tree'))) $lang->execution->menu = $lang->execution->viewMenu;
+ if(in_array($methodName, array('qa', 'bug', 'testtask', 'testcase', 'testreport'))) $lang->execution->menu = $lang->execution->qaMenu;
+ if(in_array($methodName, array('view', 'manageproducts', 'team', 'whitelist', 'edit', 'managemembers', 'addwhitelist'))) $lang->execution->menu = self::processMenuVars($lang->execution->settingMenu);
}
if(strpos('qa|bug|testcase|testreport|testtask', $moduleName) !== false and $group == 'project')
{
@@ -2454,7 +2456,7 @@ EOD;
}
/**
- * Get program module menu by model.
+ * Get project module menu by model.
*
* @param varchar $moduleName
* @param varchar $methodName
@@ -2462,7 +2464,7 @@ EOD;
* @access public
* @return string
*/
- public static function getProgramModuleMenu($moduleName, $methodName)
+ public static function getProjectModuleMenu($moduleName, $methodName)
{
global $app, $lang, $dbh;
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php
index f63940aeeb..8d950a20ff 100755
--- a/module/common/view/header.html.php
+++ b/module/common/view/header.html.php
@@ -25,7 +25,7 @@ $isQa = $rawModule == 'qa';
config->systemMode == 'new'):?>
program->switcherMenu) ? $lang->program->switcherMenu : '';?>
loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
- execution->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?>
+ loadModel('execution')->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?>
config->systemMode == 'classic'):?>
project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
diff --git a/module/custom/js/common.js b/module/custom/js/common.js
new file mode 100644
index 0000000000..8ffc22d8bc
--- /dev/null
+++ b/module/custom/js/common.js
@@ -0,0 +1,19 @@
+$(function()
+{
+ $object = $('.btn-toolbar.pull-left');
+ while(true)
+ {
+ if($object.children(':first-child').hasClass('divider'))
+ {
+ $object.children(':first-child').remove();
+ continue;
+ }
+ if($object.children(':last-child').hasClass('divider'))
+ {
+ $object.children(':last-child').remove();
+ continue;
+ }
+
+ break;
+ }
+})
diff --git a/module/custom/view/header.html.php b/module/custom/view/header.html.php
index 096d1baaaa..3b19374421 100644
--- a/module/custom/view/header.html.php
+++ b/module/custom/view/header.html.php
@@ -4,13 +4,15 @@
custom->object as $object => $name)
{
- if(strpos('story|todo|block', $object) !== false and count($lang->custom->object) > 1) echo "";
+ if(strpos('story|todo|block', $object) !== false) echo "";
if(strpos('execution|product', $object) !== false) common::printLink('custom', $object, "", "{$lang->custom->$object}", '', "class='btn btn-link' id='{$object}Tab'");
if(strpos('execution|product', $object) === false) common::printLink('custom', 'set', "module=$object&field=" . key($lang->custom->{$object}->fields), "{$name}", '', "class='btn btn-link' id='{$object}Tab'");
+ if($object == 'user') common::printLink('custom', 'required', "", "{$lang->custom->required}", '', "class='btn btn-link' id='requiredTab'");
}
foreach($lang->custom->system as $sysObject)
{
+ if($sysObject == 'required') continue;
common::printLink('custom', $sysObject, "", "{$lang->custom->$sysObject}", '', "class='btn btn-link' id='{$sysObject}Tab'");
}
if((isset($config->systemMode) and $config->systemMode == 'classic') || (isset($config->global->upgradeStep) and $config->global->upgradeStep == 'mergeProgram'))
diff --git a/module/execution/config.php b/module/execution/config.php
index c7c4a3e23e..d676890ad2 100644
--- a/module/execution/config.php
+++ b/module/execution/config.php
@@ -16,7 +16,7 @@ $app->loadLang('task');
$config->execution->task = new stdclass();
$config->execution->create = new stdclass();
$config->execution->edit = new stdclass();
-$config->execution->create->requiredFields = 'name,code,begin,end';
+$config->execution->create->requiredFields = 'project,name,code,begin,end';
$config->execution->edit->requiredFields = 'name,code,begin,end';
$config->execution->customBatchEditFields = 'days,type,teamname,status,desc,PO,QD,PM,RD';
diff --git a/module/execution/control.php b/module/execution/control.php
index 22fa42e32a..f47840c91a 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -59,6 +59,7 @@ class execution extends control
*/
public function index($locate = 'auto', $executionID = 0)
{
+ $this->lang->execution->menu = $this->lang->execution->homeMenu;
if($locate == 'yes') $this->locate($this->createLink('execution', 'task'));
$this->commonAction($executionID);
@@ -265,9 +266,7 @@ class execution extends control
*/
public function grouptask($executionID = 0, $groupBy = 'story', $filter = '')
{
- $moduleIndex = array_search('execution', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
+ $this->showModuleMenu();
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -819,6 +818,21 @@ class execution extends control
$this->display();
}
+ /**
+ * Exectuion qa dashboard.
+ *
+ * @param int $executionID
+ * @access public
+ * @return void
+ */
+ public function qa($executionID = 0)
+ {
+ $this->showModuleMenu();
+ $this->commonAction($executionID);
+ $this->view->title = $this->lang->execution->qa;
+ $this->display();
+ }
+
/**
* Browse bugs of a execution.
*
@@ -835,6 +849,8 @@ class execution extends control
*/
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
+ $this->showModuleMenu();
+
/* Load these two models. */
$this->loadModel('bug');
$this->loadModel('user');
@@ -893,6 +909,33 @@ class execution extends control
$this->display();
}
+ /**
+ * Execution case list.
+ *
+ * @param int $executionID
+ * @access public
+ * @return void
+ */
+ public function testcase($executionID = 0, $type = 'all', $param = 0, $productID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
+ {
+ $this->loadModel('testcase');
+ $this->showModuleMenu();
+ $this->commonAction($executionID);
+
+ $products = $this->execution->getProducts($executionID, false);
+ if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
+
+ $productID = $this->loadModel('product')->saveState($productID, $products);
+ $this->product->setMenu($products, $productID);
+
+ $this->view->title = $this->lang->execution->testcase;
+ $this->view->executionID = $executionID;
+ $this->view->productID = $productID;
+ $this->view->execution = $this->execution->getByID($executionID);
+
+ $this->display();
+ }
+
/**
* Browse builds of a execution.
*
@@ -967,6 +1010,8 @@ class execution extends control
*/
public function testtask($executionID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
+ $this->showModuleMenu();
+
$this->loadModel('testtask');
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
@@ -1089,6 +1134,9 @@ class execution extends control
*/
public function team($executionID = 0)
{
+ $moduleIndex = array_search('execution', $this->lang->noMenuModule);
+ if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
+
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1133,8 +1181,8 @@ class execution extends control
die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "productID=&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "productID=&executionID=$executionID"), 'parent', 'parent'));
}
}
- $this->view->title = $this->lang->execution->tips;
- $this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
+ $this->view->title = $this->lang->execution->tips;
+ $this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
$this->view->executionID = $executionID;
$this->display();
exit;
@@ -1177,7 +1225,7 @@ class execution extends control
if(!empty($_POST))
{
- $executionID = $copyExecutionID == '' ? $this->execution->create() : $this->execution->create($copyExecutionID);
+ $executionID = $this->execution->create($copyExecutionID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->execution->updateProducts($executionID);
@@ -1223,7 +1271,7 @@ class execution extends control
$this->view->title = $this->lang->execution->create;
$this->view->position[] = $this->view->title;
- $this->view->executions = array('' => '') + $this->executions;
+ $this->view->executions = array('' => '') + $this->execution->getList();
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$this->view->acl = $acl;
@@ -1231,6 +1279,7 @@ class execution extends control
$this->view->name = $name;
$this->view->code = $code;
$this->view->team = $team;
+ $this->view->allProjects = array('' => '') + $this->project->getPairsByModel();
$this->view->executionID = $executionID;
$this->view->productID = $productID;
$this->view->products = $products;
@@ -1256,6 +1305,8 @@ class execution extends control
*/
public function edit($executionID, $action = 'edit', $extra = '')
{
+ $this->showModuleMenu();
+
/* Load language files and get browseExecutionLink. */
$this->app->loadLang('program');
$this->app->loadLang('stage');
@@ -1648,6 +1699,8 @@ class execution extends control
*/
public function view($executionID)
{
+ $this->showModuleMenu();
+
$execution = $this->execution->getById($executionID, true);
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
@@ -1761,8 +1814,7 @@ class execution extends control
*/
public function tree($executionID, $type = 'task')
{
- $moduleIndex = array_search('execution', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
+ $this->showModuleMenu();
$this->execution->setMenu($this->executions, $executionID);
$execution = $this->loadModel('execution')->getById($executionID);
@@ -1993,6 +2045,9 @@ class execution extends control
*/
public function manageProducts($executionID, $from = '')
{
+ $moduleIndex = array_search('execution', $this->lang->noMenuModule);
+ if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
+
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
@@ -2078,6 +2133,8 @@ class execution extends control
*/
public function manageMembers($executionID = 0, $team2Import = 0, $dept = 0)
{
+ $this->showModuleMenu();
+
if(!empty($_POST))
{
$this->execution->manageMembers($executionID);
@@ -2491,7 +2548,8 @@ class execution extends control
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
- $this->view->executions = $this->execution->getByProject($execution->project);
+ $this->view->projects = $this->project->getPairsByModel();
+ $this->view->executions = $this->execution->getList();
$this->display();
}
@@ -2516,7 +2574,7 @@ class execution extends control
$executionsPinYin = common::convert2Pinyin($executionsName);
foreach($executions as $execution)
{
- $link = helper::createLink('execution', 'task', 'executionID=' . $execution->id, '', false, $execution->execution);
+ $link = helper::createLink('execution', 'task', 'executionID=' . $execution->id, '', false, $execution->project);
$execution->code = empty($execution->code) ? $execution->name : $execution->code;
$dataKey = 'date-key="' . zget($executionsPinYin, $execution->name, $execution->name) . '"';
$class = "class='search-list-item $color' title='$execution->name' $dataKey";
@@ -2586,6 +2644,8 @@ class execution extends control
*/
public function all($status = 'all', $projectID = 0, $from = 'execution', $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
{
+ $this->lang->execution->menu = $this->lang->execution->homeMenu;
+
$this->app->loadLang('my');
$this->app->loadLang('product');
$this->app->loadLang('programplan');
@@ -2629,6 +2689,9 @@ class execution extends control
*/
public function whitelist($executionID = 0, $module='execution', $objectType = 'sprint', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
+ $moduleIndex = array_search('execution', $this->lang->noMenuModule);
+ if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
+
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
@@ -2648,6 +2711,8 @@ class execution extends control
*/
public function addWhitelist($executionID = 0, $deptID = 0)
{
+ $this->showModuleMenu();
+
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
@@ -2665,9 +2730,9 @@ class execution extends control
* @access public
* @return void
*/
- public function unbindWhielist($id = 0, $confirm = 'no')
+ public function unbindWhitelist($id = 0, $confirm = 'no')
{
- echo $this->fetch('personnel', 'unbindWhielist', "id=$id&confirm=$confirm");
+ echo $this->fetch('personnel', 'unbindWhitelist', "id=$id&confirm=$confirm");
}
/**
@@ -2921,4 +2986,16 @@ class execution extends control
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
+
+ /**
+ * Show module menu for some module.
+ *
+ * @access public
+ * @return void
+ */
+ public function showModuleMenu()
+ {
+ $moduleIndex = array_search('execution', $this->lang->noMenuModule);
+ if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
+ }
}
diff --git a/module/execution/js/create.js b/module/execution/js/create.js
index ffdf92adb5..3d2311b7d5 100644
--- a/module/execution/js/create.js
+++ b/module/execution/js/create.js
@@ -1,6 +1,6 @@
-function setCopyProject(projectID)
+function setCopyProject(executionID)
{
- location.href = createLink('project', 'create', 'productID=&projectID=0©ProjectID=' + projectID);
+ location.href = createLink('execution', 'create', 'productID=&executionID=0©ExecutionID=' + executionID);
}
$(function()
diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php
index bfb0e35db3..3fa4db04ca 100644
--- a/module/execution/lang/de.php
+++ b/module/execution/lang/de.php
@@ -16,6 +16,7 @@ $lang->execution->id = $lang->executionCommon . ' ID';
$lang->execution->type = 'Typ';
$lang->execution->name = 'Name';
$lang->execution->code = 'Alias';
+$lang->execution->project = 'Project';
$lang->execution->statge = 'Stage';
$lang->execution->pri = 'Priorität';
$lang->execution->openedBy = 'OpenedBy';
@@ -42,7 +43,6 @@ $lang->execution->PO = 'PO';
$lang->execution->PM = 'PM';
$lang->execution->QD = 'QS Manager';
$lang->execution->RD = 'Release Manager';
-$lang->execution->qa = 'Test';
$lang->execution->release = 'Release';
$lang->execution->acl = 'Zugriffskontrolle';
$lang->execution->teamname = 'Team Name';
@@ -51,7 +51,7 @@ $lang->execution->orderAB = "Rank";
$lang->execution->products = "Verknüpfung {$lang->productCommon}";
$lang->execution->whitelist = 'Whitelist';
$lang->execution->addWhitelist = 'Add Whitelist';
-$lang->execution->unbindWhielist = 'Remove Whitelist';
+$lang->execution->unbindWhitelist = 'Remove Whitelist';
$lang->execution->totalEstimate = 'Geplant';
$lang->execution->totalConsumed = 'Genutzt';
$lang->execution->totalLeft = 'Rest';
diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php
index a98506283e..f9b4b8ed7d 100644
--- a/module/execution/lang/en.php
+++ b/module/execution/lang/en.php
@@ -16,6 +16,7 @@ $lang->execution->id = $lang->executionCommon . ' ID';
$lang->execution->type = 'Type';
$lang->execution->name = "{$lang->executionCommon} Name";
$lang->execution->code = 'Code';
+$lang->execution->project = 'Project';
$lang->execution->statge = 'Stage';
$lang->execution->pri = 'Priority';
$lang->execution->openedBy = 'OpenedBy';
@@ -42,7 +43,6 @@ $lang->execution->PO = "{$lang->executionCommon} Owner";
$lang->execution->PM = "{$lang->executionCommon} Manager";
$lang->execution->QD = 'Test Manager';
$lang->execution->RD = 'Release Manager';
-$lang->execution->qa = 'Test';
$lang->execution->release = 'Release';
$lang->execution->acl = 'Access Control';
$lang->execution->teamname = 'Team Name';
@@ -51,7 +51,7 @@ $lang->execution->orderAB = "Rank";
$lang->execution->products = "Link {$lang->productCommon}";
$lang->execution->whitelist = 'Whitelist';
$lang->execution->addWhitelist = 'Add Whitelist';
-$lang->execution->unbindWhielist = 'Remove Whitelist';
+$lang->execution->unbindWhitelist = 'Remove Whitelist';
$lang->execution->totalEstimate = 'Estimates';
$lang->execution->totalConsumed = 'Cost';
$lang->execution->totalLeft = 'Left';
@@ -179,6 +179,7 @@ $lang->execution->treeAction = "{$lang->executionCommon} Tree View";
$lang->execution->exportAction = "Export {$lang->executionCommon}";
$lang->execution->computeBurnAction = "Update Burndown";
$lang->execution->create = "Create {$lang->executionCommon}";
+$lang->execution->createExec = "Create execution";
$lang->execution->copy = "Copy {$lang->executionCommon}";
$lang->execution->delete = "Delete {$lang->executionCommon}";
$lang->execution->browse = "{$lang->executionCommon} List";
@@ -194,6 +195,7 @@ $lang->execution->importTask = 'Transfer Task';
$lang->execution->importPlanStories = 'Link Stories By Plan';
$lang->execution->importBug = 'Import Bug';
$lang->execution->updateOrder = "Rank {$lang->executionCommon}";
+$lang->execution->execUpdateOrder = "Rank execution";
$lang->execution->tree = 'Tree';
$lang->execution->treeTask = 'Show Task Only';
$lang->execution->treeStory = 'Show Story Only';
@@ -306,12 +308,7 @@ $lang->execution->fixFirstWithLeft = 'Update hours left too';
$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has ";
$lang->execution->unfinishedTask = "[%s] unfinished tasks. ";
$lang->execution->unresolvedBug = "[%s] unresolved bugs. ";
-
-$lang->execution->action = new stdclass();
-$lang->execution->action->opened = '$date, created by $actor . $extra' . "\n";
-$lang->execution->action->managed = '$date, managed by $actor . $extra' . "\n";
-$lang->execution->action->edited = '$date, edited by $actor . $extra' . "\n";
-$lang->execution->action->extra = "The linked {$lang->productCommon}s are %s.";
+$lang->execution->projectNotEmpty = 'Project cannot be empty.';
/* Statistics. */
$lang->execution->charts = new stdclass();
diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php
index f44e514127..915d1c7ac6 100644
--- a/module/execution/lang/fr.php
+++ b/module/execution/lang/fr.php
@@ -42,7 +42,6 @@ $lang->execution->PO = "Propriétaire {$lang->executionCommon}";
$lang->execution->PM = "Directeur {$lang->executionCommon}";
$lang->execution->QD = 'Quality Manager';
$lang->execution->RD = 'Release Manager';
-$lang->execution->qa = 'QA';
$lang->execution->release = 'Release';
$lang->execution->acl = "Contrôle d'accès";
$lang->execution->teamname = "Nom de l'équipe";
@@ -51,7 +50,7 @@ $lang->execution->orderAB = "Rang";
$lang->execution->products = "{$lang->productCommon} liés";
$lang->execution->whitelist = 'Liste Blanche';
$lang->execution->addWhitelist = 'Add Whitelist';
-$lang->execution->unbindWhielist = 'Remove Whitelist';
+$lang->execution->unbindWhitelist = 'Remove Whitelist';
$lang->execution->totalEstimate = 'Estimé';
$lang->execution->totalConsumed = 'Coût';
$lang->execution->totalLeft = 'Reste';
diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php
index 7b19d2c572..67285ee4f2 100644
--- a/module/execution/lang/vi.php
+++ b/module/execution/lang/vi.php
@@ -51,7 +51,7 @@ $lang->execution->orderAB = "Đánh giá";
$lang->execution->products = "Liên kết {$lang->productCommon}";
$lang->execution->whitelist = 'Danh sách trắng';
$lang->execution->addWhitelist = 'Add Whitelist';
-$lang->execution->unbindWhielist = 'Remove Whitelist';
+$lang->execution->unbindWhitelist = 'Remove Whitelist';
$lang->execution->totalEstimate = 'Dự tính';
$lang->execution->totalConsumed = 'Đã làm';
$lang->execution->totalLeft = 'Còn';
diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php
index 90ace49426..02adcbe7c7 100644
--- a/module/execution/lang/zh-cn.php
+++ b/module/execution/lang/zh-cn.php
@@ -17,6 +17,7 @@ $lang->execution->id = $lang->executionCommon . '编号';
$lang->execution->type = $lang->executionCommon . '类型';
$lang->execution->name = $lang->executionCommon . '名称';
$lang->execution->code = $lang->executionCommon . '代号';
+$lang->execution->project = '所属项目';
$lang->execution->execName = '执行名称';
$lang->execution->execCode = '执行代号';
$lang->execution->statge = '阶段';
@@ -46,7 +47,6 @@ $lang->execution->PO = $lang->productCommon . '负责人';
$lang->execution->PM = $lang->executionCommon . '负责人';
$lang->execution->QD = '测试负责人';
$lang->execution->RD = '发布负责人';
-$lang->execution->qa = '测试';
$lang->execution->release = '发布';
$lang->execution->acl = '访问控制';
$lang->execution->teamname = '团队名称';
@@ -55,7 +55,7 @@ $lang->execution->orderAB = '排序';
$lang->execution->products = '相关' . $lang->productCommon;
$lang->execution->whitelist = '白名单';
$lang->execution->addWhitelist = '添加白名单';
-$lang->execution->unbindWhielist = '删除白名单';
+$lang->execution->unbindWhitelist = '删除白名单';
$lang->execution->totalEstimate = '预计';
$lang->execution->totalConsumed = '消耗';
$lang->execution->totalLeft = '剩余';
@@ -151,6 +151,7 @@ $lang->execution->task = '任务列表';
$lang->execution->groupTask = '分组浏览任务';
$lang->execution->story = "{$lang->SRCommon}列表";
$lang->execution->bug = 'Bug列表';
+$lang->execution->testcase = '用例列表';
$lang->execution->dynamic = '动态';
$lang->execution->latestDynamic = '最新动态';
$lang->execution->build = '所有版本';
@@ -183,6 +184,7 @@ $lang->execution->treeAction = "{$lang->executionCommon}树状图";
$lang->execution->exportAction = "导出{$lang->executionCommon}";
$lang->execution->computeBurnAction = "计算燃尽图";
$lang->execution->create = "添加{$lang->executionCommon}";
+$lang->execution->createExec = "添加执行";
$lang->execution->copy = "复制{$lang->executionCommon}";
$lang->execution->delete = "删除{$lang->executionCommon}";
$lang->execution->browse = "浏览{$lang->executionCommon}";
@@ -198,6 +200,7 @@ $lang->execution->importTask = '转入任务';
$lang->execution->importPlanStories = "按计划关联{$lang->SRCommon}";
$lang->execution->importBug = '导入Bug';
$lang->execution->updateOrder = "{$lang->executionCommon}排序";
+$lang->execution->execUpdateOrder = "执行排序";
$lang->execution->tree = '树状图';
$lang->execution->treeTask = '只看任务';
$lang->execution->treeStory = "只看{$lang->SRCommon}";
@@ -310,12 +313,7 @@ $lang->execution->fixFirstWithLeft = '修改剩余工时';
$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有";
$lang->execution->unfinishedTask = "[%s]个未完成的任务,";
$lang->execution->unresolvedBug = "[%s]个未解决的bug,";
-
-$lang->execution->action = new stdclass();
-$lang->execution->action->opened = '$date, 由 $actor 创建。$extra' . "\n";
-$lang->execution->action->managed = '$date, 由 $actor 维护。$extra' . "\n";
-$lang->execution->action->edited = '$date, 由 $actor 编辑。$extra' . "\n";
-$lang->execution->action->extra = '相关产品为 %s。';
+$lang->execution->projectNotEmpty = '所属项目不能为空。';
/* 统计。*/
$lang->execution->charts = new stdclass();
diff --git a/module/execution/lang/zh-tw.php b/module/execution/lang/zh-tw.php
index 6aeeee45ee..251238a483 100644
--- a/module/execution/lang/zh-tw.php
+++ b/module/execution/lang/zh-tw.php
@@ -51,7 +51,7 @@ $lang->project->orderAB = '排序';
$lang->project->products = '相關' . $lang->productCommon;
$lang->project->whitelist = '白名單';
$lang->project->addWhitelist = '添加白名單';
-$lang->project->unbindWhielist = '刪除白名單';
+$lang->project->unbindWhitelist = '刪除白名單';
$lang->project->totalEstimate = '預計';
$lang->project->totalConsumed = '消耗';
$lang->project->totalLeft = '剩餘';
diff --git a/module/execution/model.php b/module/execution/model.php
index 3f1b45ad2d..bf1b09a299 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -62,8 +62,6 @@ class executionModel extends model
*/
public function setMenu($executions, $executionID, $buildID = 0, $extra = '')
{
- if($this->app->rawMethod != 'index' and $this->app->rawMethod != 'all') $this->lang->execution->menu = $this->lang->execution->viewMenu;
-
if(empty($executions))
{
$project = $this->loadModel('project')->getByID($this->session->PRJ);
@@ -115,8 +113,8 @@ class executionModel extends model
if($methodName == 'all') $label = $this->lang->execution->allExecutions;
if($methodName == 'create' and $moduleName == 'execution') $label = $this->lang->execution->create;
- $executionIndex = $this->select($executions, $executionID, null, $moduleName, $methodName, $extra);
- if($this->config->systemMode == 'new') $this->lang->modulePageNav = $executionIndex;
+ foreach($this->lang->execution->viewMenu as $key => $menu) common::setMenuVars($this->lang->execution->viewMenu, $key, $executionID);
+ foreach($this->lang->execution->qaMenu as $key => $menu) common::setMenuVars($this->lang->execution->qaMenu, $key, $executionID);
foreach($this->lang->execution->menu as $key => $menu)
{
@@ -326,9 +324,15 @@ class executionModel extends model
{
$this->lang->execution->team = $this->lang->execution->teamname;
+ if(empty($_POST['project']))
+ {
+ dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
+ return false;
+ }
+
/* Determine whether to add a sprint or a stage according to the model of the execution. */
- $execution = $this->getByID($this->session->PRJ);
- $sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $execution->model, '') : 'sprint';
+ $project = $this->getByID($_POST['project']);
+ $sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $project->model, '') : 'sprint';
/* If the execution model is a stage, determine whether the product is linked. */
if($sprintType == 'stage' and empty($this->post->products[0]))
@@ -346,8 +350,7 @@ class executionModel extends model
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', helper::now())
->setDefault('team', substr($this->post->name,0, 30))
- ->setIF($this->config->systemMode == 'new', 'project', $this->session->PRJ)
- ->setIF($this->config->systemMode == 'new', 'parent', $this->session->PRJ)
+ ->setIF($this->config->systemMode == 'new', 'parent', $this->post->project)
->setIF($this->post->acl == 'open', 'whitelist', '')
->join('whitelist', ',')
->add('type', $sprintType)
@@ -387,7 +390,7 @@ class executionModel extends model
$this->file->updateObjectID($this->post->uid, $executionID, 'execution');
/* Update the path. */
- if(isset($this->config->maxVersion)) $this->loadModel('programplan')->setTreePath($executionID);
+ $this->setTreePath($executionID);
/* Copy team of execution. */
if($copyExecutionID != '')
@@ -419,7 +422,7 @@ class executionModel extends model
$member->hours = $this->config->execution->defaultWorkhours;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
- $this->addExecutionMembers($this->session->PRJ, array($member));
+ $this->addExecutionMembers($sprint->project, array($member));
}
/* Create doc lib. */
@@ -3488,10 +3491,10 @@ class executionModel extends model
*/
public function getRecentExecutions()
{
- $isView = (empty($this->app->user->view->sprints) || empty($this->app->user->view->executions)) ? false : true;
+ $isView = (empty($this->app->user->view->sprints) || empty($this->app->user->view->projects)) ? false : true;
if(!$this->app->user->admin && $isView === false) return array();
- $executions = $this->dao->select('t1.id,t1.execution,t1.code,t1.name,t1.type')->from(TABLE_EXECUTION)->alias('t1')
+ $executions = $this->dao->select('t1.id,t1.project,t1.code,t1.name,t1.type')->from(TABLE_EXECUTION)->alias('t1')
->leftJoin(TABLE_TEAM)->alias('t2')->on('t1.id=t2.root')
->where('t1.type')->in('stage,sprint')
->andWhere('t2.account')->eq($this->app->user->account)
@@ -3499,37 +3502,37 @@ class executionModel extends model
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->projects)->fi()
->andWhere('t1.status')->ne('closed')
->andWhere('t1.deleted')->eq('0')
- ->orderBy('execution_desc, id_desc')
+ ->orderBy('project_desc, id_desc')
->fetchAll();
- /* Get the execution or product to which the execution belongs. */
- $executionIdList = array();
+ /* Get the project or product to which the execution belongs. */
+ $projectIdList = array();
$stageIdList = array();
foreach($executions as $execution)
{
if($execution->type == 'stage') $stageIdList[$execution->id] = $execution->id;
- $executionIdList[$execution->execution] = $execution->execution;
+ $projectIdList[$execution->project] = $execution->project;
}
- $executionPairs = $this->loadModel('execution')->getPairsByIdList($executionIdList);
+ $projectPairs = $this->loadModel('project')->getPairsByIdList($projectIdList);
$productPairs = $this->getStageLinkProductPairs($stageIdList);
$recentExecutions = isset($this->config->execution->recentExecutions) ? explode(',', $this->config->execution->recentExecutions) : array();
- $allExecutions = array('recent' => array(), 'mine' => array());
+ $allExecution = array('recent' => array(), 'mine' => array());
foreach($executions as $execution)
{
- if($execution->type == 'stage') $execution->name = zget($executionPairs, $execution->execution) . '/' . zget($productPairs, $execution->id) . '/' . $execution->name;
- if($execution->type == 'sprint') $execution->name = zget($executionPairs, $execution->execution) . '/' . $execution->name;
+ if($execution->type == 'stage') $execution->name = zget($projectPairs, $execution->project) . '/' . zget($productPairs, $execution->id) . '/' . $execution->name;
+ if($execution->type == 'sprint') $execution->name = zget($projectPairs, $execution->project) . '/' . $execution->name;
if(in_array($execution->id, $recentExecutions))
{
$index = array_search($execution->id, $recentExecutions);
- $allExecutions['recent'][$index] = $execution;
+ $allExecution['recent'][$index] = $execution;
continue;
}
- $allExecutions['mine'][] = $execution;
+ $allExecution['mine'][] = $execution;
}
- ksort($allExecutions['recent']);
- return $allExecutions;
+ ksort($allExecution['recent']);
+ return $allExecution;
}
/**
@@ -3547,4 +3550,29 @@ class executionModel extends model
->fetchPairs('project', 'name');
return $productpairs;
}
+
+ /**
+ ** Set stage tree path.
+ **
+ ** @param int $executionID
+ ** @access public
+ ** @return bool
+ **/
+ public function setTreePath($executionID)
+ {
+ $execution = $this->dao->select('id,type,parent,path,grade')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
+ $parent = $this->dao->select('id,type,parent,path,grade')->from(TABLE_PROJECT)->where('id')->eq($execution->parent)->fetch();
+
+ if($parent->type == 'project')
+ {
+ $path['path'] = ",{$parent->id},{$execution->id},";
+ $path['grade'] = 1;
+ }
+ elseif($parent->type == 'stage')
+ {
+ $path['path'] = $parent->path . "{$execution->id},";
+ $path['grade'] = $parent->grade + 1;
+ }
+ $this->dao->update(TABLE_PROJECT)->set('path')->eq($path['path'])->set('grade')->eq($path['grade'])->where('id')->eq($execution->id)->exec();
+ }
}
diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php
index fe4e0a05fe..2debb51b63 100644
--- a/module/execution/view/ajaxgetdropmenu.html.php
+++ b/module/execution/view/ajaxgetdropmenu.html.php
@@ -21,15 +21,16 @@ $executionsPinYin = common::convert2Pinyin($executionNames);
foreach($executions as $execution)
{
+ $executionName = zget($projects, $execution->project) . '/' . $execution->name;
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account)
{
- $myProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $execution->name, '', "class='text-important' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
+ $myProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $executionName, '', "class='text-important' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
}
else if($execution->status != 'done' and $execution->status != 'closed' and !($execution->PM == $this->app->user->account))
{
- $normalProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $execution->name, '', "title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
+ $normalProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
}
- else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $execution->name, '', "title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
+ else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), " " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
}
?>
diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php
index 375a4801b2..180ee10b17 100644
--- a/module/execution/view/all.html.php
+++ b/module/execution/view/all.html.php
@@ -41,7 +41,7 @@
" . $lang->export, '', "class='btn btn-link export'")?>
- createLink('execution', 'create'), " " . $this->lang->execution->create, '', "class='btn btn-primary'");?>
+ createLink('execution', 'create'), " " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary'");?>
@@ -79,7 +79,7 @@
execution->totalEstimate;?>
execution->totalConsumed;?>
execution->totalLeft;?>
- execution->progress;?>
+ execution->progress;?>
execution->burn;?>
execution->orderAB);?>
@@ -118,10 +118,8 @@
hours->totalConsumed . ' ' . $config->hourUnit;?>
hours->totalLeft . ' ' . $config->hourUnit;?>
-
burns);?>'>
@@ -162,10 +160,8 @@
hours->totalConsumed;?>
hours->totalLeft;?>
-
burns);?>'>
@@ -185,7 +181,7 @@
diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php
index c81a27bb2b..9676214649 100644
--- a/module/execution/view/create.html.php
+++ b/module/execution/view/create.html.php
@@ -46,6 +46,11 @@
-
- hours->progress;?>%
-
+
+
hours->progress;?>
-
- hours->progress;?>%
-
+
+
hours->progress;?>
execution->batchEdit, '', 'btn');?>
- recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->execution->updateOrder, '', "class='btn'");?>
+ recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $from == 'execution' ? $lang->execution->execUpdateOrder : $lang->execution->updateOrder, '', "class='btn'");?>
show('right', 'pagerjs');?>