diff --git a/framework/base/router.class.php b/framework/base/router.class.php index e8adf04cce..b8281b8c0f 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -376,13 +376,13 @@ class baseRouter $this->loadClass('dao', $static = true); $this->loadClass('mobile', $static = true); + $this->setOpenApp(); $this->setSuperVars(); $this->setDebug(); $this->setErrorHandler(); $this->setTimezone(); $this->startSession(); $this->setProject(); - $this->setOpenApp(); if($this->config->framework->multiSite) $this->setSiteCode() && $this->loadExtraConfig(); if($this->config->framework->autoConnectDB) $this->connectDB(); @@ -600,7 +600,7 @@ class baseRouter $this->get = new super('get'); $this->server = new super('server'); $this->cookie = new super('cookie'); - $this->session = new super('session'); + $this->session = new super('session', $this->openApp); unset($GLOBALS); unset($_REQUEST); @@ -2477,9 +2477,10 @@ class super * @access public * @return void */ - public function __construct($scope) + public function __construct($scope, $openApp = '') { - $this->scope = $scope; + $this->scope = $scope; + $this->openApp = $openApp; } /** @@ -2511,6 +2512,8 @@ class super } elseif($this->scope == 'session') { + $openApp = $this->openApp; + empty($openApp) ? $_SESSION[$key] = $value : $_SESSION['app-' . $openApp][$key] = $value; $_SESSION[$key] = $value; } elseif($this->scope == 'env') @@ -2558,7 +2561,10 @@ class super } elseif($this->scope == 'session') { + $openApp = $this->openApp; + if(!empty($openApp) and isset($_SESSION['app-' . $openApp][$key])) return $_SESSION['app-' . $openApp][$key]; if(isset($_SESSION[$key])) return $_SESSION[$key]; + return false; } elseif($this->scope == 'env') diff --git a/module/bug/control.php b/module/bug/control.php index e982938b20..65a3f1e459 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -285,6 +285,9 @@ class bug extends control /* Whether there is a object to transfer bug, for example feedback. */ $extras = str_replace(array(',', ' '), array('&', ''), $extras); parse_str($extras, $output); + + if(isset($output['executionID'])) commonModel::setAppObjectID('execution', $output['executionID']); + foreach($output as $paramKey => $paramValue) { if(isset($this->config->bug->fromObjects[$paramKey])) diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 6dcb48ac2f..b99efe0a2d 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -356,7 +356,7 @@ $lang->execution->subMenu->view->tree = 'Baumansicht|execution|tree|executi $lang->execution->subMenu->qa = new stdclass(); $lang->execution->subMenu->qa->bug = 'Bug|execution|bug|executionID=%s'; $lang->execution->subMenu->qa->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build'); -$lang->execution->subMenu->qa->testtask = array('link' => 'Test Aufgabe|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask'); +$lang->execution->subMenu->qa->testtask = array('link' => 'Test Aufgabe|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask', 'alias' => 'create'); $lang->execution->subMenu->more = new stdclass(); $lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist'); @@ -626,6 +626,7 @@ $lang->navGroup->measrecord = 'project'; $lang->navGroup->execution = 'execution'; $lang->navGroup->task = 'execution'; $lang->navGroup->build = 'execution'; +$lang->navGroup->repo = 'execution'; $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index e1392fc368..5a64d04755 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -344,13 +344,13 @@ $lang->execution->menu->kanban = array('link' => 'Kanban|execution|kanban|exec $lang->execution->menu->burn = array('link' => 'Burndown|execution|burn|executionID=%s'); $lang->execution->menu->view = array('link' => 'View|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover'); $lang->execution->menu->story = array('link' => 'Story|execution|story|executionID=%s', 'subModule' => 'story', 'alias' => 'linkstory,storykanban'); -$lang->execution->menu->bug = array('link' => 'Bug|execution|bug|executionID=%s'); -$lang->execution->menu->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build'); -$lang->execution->menu->testtask = array('link' => 'Request|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask'); +$lang->execution->menu->qa = array('link' => 'Bug|execution|qa|executionID=%s', 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport'); +$lang->execution->menu->repo = array('link' => 'Repo|repo|browse|projectID=%s'); $lang->execution->menu->doc = array('link' => 'Doc|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc'); -$lang->execution->menu->product = $lang->productCommon . '|execution|manageproducts|executionID=%s'; -$lang->execution->menu->team = array('link' => 'Team|execution|team|executionID=%s', 'alias' => 'managemembers'); -$lang->execution->menu->more = array('link' => 'More|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit', 'class' => 'dropdown dropdown-hover'); +$lang->execution->menu->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build'); +$lang->execution->menu->release = array('link' => 'Release|projectrelease|browse|project=%s'); +$lang->execution->menu->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s'); +$lang->execution->menu->setting = array('link' => 'Settings|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover'); $lang->execution->subMenu = new stdclass(); $lang->execution->subMenu->view = new stdclass(); @@ -360,7 +360,7 @@ $lang->execution->subMenu->view->tree = 'Tree View|execution|tree|execution $lang->execution->subMenu->qa = new stdclass(); $lang->execution->subMenu->qa->bug = 'Bug|execution|bug|executionID=%s'; $lang->execution->subMenu->qa->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build'); -$lang->execution->subMenu->qa->testtask = array('link' => 'Request|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask'); +$lang->execution->subMenu->qa->testtask = array('link' => 'Request|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask', 'alias' => 'create'); $lang->execution->subMenu->more = new stdclass(); $lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist'); @@ -623,9 +623,12 @@ $lang->navGroup->measrecord = 'project'; $lang->navGroup->execution = 'execution'; $lang->navGroup->task = 'execution'; $lang->navGroup->build = 'execution'; +$lang->navGroup->repo = 'execution'; $lang->navGroup->doc = 'doc'; +$lang->navGroup->qa = 'qa'; + $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; $lang->navGroup->cmcl = 'system'; @@ -857,7 +860,7 @@ $lang->menu = new stdclass(); $lang->menu->scrum = new stdclass(); $lang->menu->scrum->index = 'Index|project|index|project={PROJECT}'; $lang->menu->scrum->project = "$lang->executionCommon|project|index|locate=no"; -$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'subModule' => 'story', 'alias' => 'story,track'); +$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}', 'subModule' => 'story', 'alias' => 'story,track'); $lang->menu->scrum->doc = 'Doc|doc|index|'; $lang->menu->scrum->qa = 'QA|qa|index'; $lang->menu->scrum->ci = 'Code|repo|browse'; @@ -882,7 +885,7 @@ $lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|brows $lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,'); $lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|project={PROJECT}'); $lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|project={PROJECT}', 'subModule' => ',milestone,'); -$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story'); +$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}'); $lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}'; $lang->menu->waterfall->ci = 'Repo|repo|browse|'; $lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track'); diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index d4e761ee7c..d9f536650a 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -356,7 +356,7 @@ $lang->execution->subMenu->view->tree = 'Arborescence|execution|tree|execut $lang->execution->subMenu->qa = new stdclass(); $lang->execution->subMenu->qa->bug = 'Bug|execution|bug|executionID=%s'; $lang->execution->subMenu->qa->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build'); -$lang->execution->subMenu->qa->testtask = array('link' => 'Recette|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask'); +$lang->execution->subMenu->qa->testtask = array('link' => 'Recette|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask', 'alias' => 'create'); $lang->execution->subMenu->more = new stdclass(); $lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist'); @@ -618,6 +618,7 @@ $lang->navGroup->measrecord = 'project'; $lang->navGroup->execution = 'execution'; $lang->navGroup->task = 'execution'; $lang->navGroup->build = 'execution'; +$lang->navGroup->repo = 'execution'; $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index 8b4e38e90e..13868aa102 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -356,7 +356,7 @@ $lang->execution->subMenu->view->tree = 'Xem theo cây|execution|tree|execu $lang->execution->subMenu->qa = new stdclass(); $lang->execution->subMenu->qa->bug = 'Bug|execution|bug|executionID=%s'; $lang->execution->subMenu->qa->build = array('link' => 'Bản dựng|execution|build|executionID=%s', 'subModule' => 'build'); -$lang->execution->subMenu->qa->testtask = array('link' => 'Yêu cầu|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask'); +$lang->execution->subMenu->qa->testtask = array('link' => 'Yêu cầu|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask', 'alias' => 'create'); $lang->execution->subMenu->more = new stdclass(); $lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist'); @@ -624,6 +624,7 @@ $lang->navGroup->measrecord = 'project'; $lang->navGroup->execution = 'execution'; $lang->navGroup->task = 'execution'; $lang->navGroup->build = 'execution'; +$lang->navGroup->repo = 'execution'; $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index dfd252ab51..217823045d 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -160,14 +160,14 @@ $lang->program->homeMenu = new stdclass(); $lang->program->homeMenu->browse = array('link' => '项目集|program|browse|'); $lang->project = new stdclass(); -$lang->project->menu = new stdclass(); +$lang->project->homeMenu = new stdclass(); if($config->systemMode == 'new') { - $lang->project->menu->browse = array('link' => '项目|project|browse|'); + $lang->project->homeMenu->browse = array('link' => '项目|project|browse|'); } else { - $lang->project->menu->browse = array('link' => "$lang->executionCommon|project|browse|"); + $lang->project->homeMenu->browse = array('link' => "$lang->executionCommon|project|browse|"); } $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,'; @@ -344,9 +344,9 @@ $lang->execution->menu->kanban = array('link' => '看板|execution|kanban|exec $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->qa = array('link' => '测试|execution|qa|executionID=%s', 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport'); $lang->execution->menu->repo = array('link' => '代码|repo|browse|projectID=%s'); -$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc'); +$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s', 'subModule' => 'doc'); $lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build'); $lang->execution->menu->release = array('link' => '发布|projectrelease|browse|project=%s'); $lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s'); @@ -359,11 +359,10 @@ $lang->execution->viewMenu->tree = '树状图|execution|tree|executionID=%s $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->testcase = array('link' => '用例|execution|testcase|executionID=%s', 'alias' => 'create'); $lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s'); //$lang->execution->qaMenu->testreport = array('link' => '报告|testreport|browse|exeutionID=%s&type=execution'); -$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}'; @@ -630,9 +629,12 @@ $lang->navGroup->measrecord = 'project'; $lang->navGroup->execution = 'execution'; $lang->navGroup->task = 'execution'; $lang->navGroup->build = 'execution'; +$lang->navGroup->repo = 'execution'; $lang->navGroup->doc = 'doc'; +$lang->navGroup->qa = 'qa'; + $lang->navGroup->company = 'system'; $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; @@ -863,8 +865,8 @@ $lang->icons['score'] = 'tint'; $lang->menu = new stdclass(); $lang->menu->scrum = new stdclass(); $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->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}"; +$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|projectID={PROJECT}', 'alias' => 'story,track'); $lang->menu->scrum->doc = array('link' => '文档|doc|objectLibs|type=project&objectID={PROJECT}', 'subModule' => 'doc'); $lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask'); $lang->menu->scrum->ci = '代码|repo|browse'; @@ -901,7 +903,7 @@ $lang->menu->waterfall->programplan = array('link' => '计划|programplan|bro $lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,'); $lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}'); $lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,'); -$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story'); +$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}'); $lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}'; $lang->menu->waterfall->ci = '代码|repo|browse|'; $lang->menu->waterfall->track = array('link' => '矩阵|projectstory|track', 'alias' => 'track'); diff --git a/module/common/model.php b/module/common/model.php index 8b19335697..7039f9b5e4 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2289,19 +2289,6 @@ EOD; { global $lang, $config; - if($openApp == 'project') - { - if($config->systemMode == 'classic' or ($moduleName == 'project' and $methodName == 'browse')) - { - $lang->menu = $lang->project->menu; - } - else - { - $lang->menu = self::getProjectMainMenu($moduleName); - } - return; - } - if(!isset($lang->$openApp->homeMenu)) { $lang->menu = $lang->$openApp->menu; @@ -2327,8 +2314,22 @@ EOD; } } - $lang->menu = $lang->$openApp->menu; - $lang->menuOrder = $lang->$openApp->menuOrder; + if($openApp == 'project') + { + if($config->systemMode == 'classic' or ($moduleName == 'project' and $methodName == 'browse')) + { + $lang->menu = $lang->project->homeMenu; + } + else + { + $lang->menu = self::getProjectMainMenu($moduleName); + } + } + else + { + $lang->menu = $lang->$openApp->menu; + $lang->menuOrder = $lang->$openApp->menuOrder; + } } /** diff --git a/module/doc/control.php b/module/doc/control.php index 9cf126ef21..09ed175f2c 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -919,7 +919,7 @@ class doc extends control $this->lang->product->switcherMenu = $this->product->getSwitcher($objectID); $this->lang->noMenuModule[] = 'doc'; } - elseif($from == 'project') + elseif($from == 'project' or $from == 'execution') { if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; } @@ -947,7 +947,7 @@ class doc extends control $this->view->type = $type; $this->view->object = $object; - $this->view->from = $$from; + $this->view->from = $from; $this->view->libs = $this->doc->getLibsByObject($type, $objectID); $this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable. $this->display(); diff --git a/module/doc/model.php b/module/doc/model.php index 1707d7825d..6470209568 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1840,13 +1840,12 @@ class docModel extends model public function appendNavCSS() { $navCSS = ''; - if($this->lang->navGroup->doc == 'doc') + if($this->app->openApp == 'doc') { $navCSS .= <<app->rawMethod != 'index') $navCSS .= '.header-btn+.header-btn::after, .header-btn+.header-btn::before {top: -50px;}'; } diff --git a/module/execution/control.php b/module/execution/control.php index b0bde8a7a5..3f2335728f 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1511,8 +1511,6 @@ class execution extends control $rdUsers = $this->user->getPairs('noclosed|nodeleted|devfirst', $appendRdUsers, $this->config->maxCount); if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink; - $project = $this->project->getById($this->session->PRJ); - $this->view->title = $this->lang->execution->batchEdit; $this->view->position[] = $this->lang->execution->batchEdit; $this->view->executionIDList = $executionIDList; @@ -1521,7 +1519,6 @@ class execution extends control $this->view->poUsers = $poUsers; $this->view->qdUsers = $qdUsers; $this->view->rdUsers = $rdUsers; - $this->view->isStage = $project->model == 'waterfall' ? true : false; $this->display(); } diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index 58fbfc3fe9..5ccf48a5ad 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -76,7 +76,7 @@ ' style='overflow:visible'>RD, "class='form-control chosen'");?> '> type == 'stage') { echo html::select("attributes[$executionID]", $lang->stage->typeList, $executions[$executionID]->attribute, 'class=form-control'); } diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index 1e579d6dfb..e1970283e3 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -22,7 +22,7 @@
id", " " . $lang->bug->export, '', "class='btn btn-link export'");?> - id", " " . $lang->bug->create, '', "class='btn btn-primary'");?> + id", " " . $lang->bug->create, '', "class='btn btn-primary'");?>
diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php index b5bba35405..c10a65da74 100644 --- a/module/execution/view/testcase.html.php +++ b/module/execution/view/testcase.html.php @@ -4,7 +4,7 @@ {$lang->execution->all}", '', "class='btn btn-link btn-active-text'");?>
- id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-primary'");?> + id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-primary' data-app='execution'");?>
@@ -13,7 +13,7 @@

testcase->noCase;?> - id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-info'");?> + id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='execution'");?>

diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 9adef9c40f..f79ab3c8ed 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -551,7 +551,7 @@ $lang->resource->execution->qa = 'qa'; $lang->resource->execution->testtask = 'testtaskAction'; $lang->resource->execution->testcase = 'testcase'; $lang->resource->execution->bug = 'bug'; -$lang->resource->execution->testreport = 'testreport'; +//$lang->resource->execution->testreport = 'testreport'; $lang->resource->execution->burn = 'burn'; $lang->resource->execution->computeBurn = 'computeBurnAction'; $lang->resource->execution->fixFirst = 'fixFirst'; diff --git a/module/product/view/project.html.php b/module/product/view/project.html.php index dc7964c846..e3012756ad 100644 --- a/module/product/view/project.html.php +++ b/module/product/view/project.html.php @@ -49,7 +49,7 @@ id);?> - createLink('project', 'task', 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');?> + createLink('project', explode('-', $config->projectLink)[1], 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');?> programName) ? $project->programName : '';?> PM]) ? $PMList[$project->PM]->id : ''?> diff --git a/module/program/view/project.html.php b/module/program/view/project.html.php index ed27ef503c..7d5b4e2591 100644 --- a/module/program/view/project.html.php +++ b/module/program/view/project.html.php @@ -30,9 +30,9 @@ js::set('browseType', $browseType);
config->maxVersion)):?> - ' . $lang->program->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?> + ' . $lang->program->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?> config->systemMode == 'new'):?> - ' . $lang->project->create, '', 'class="btn btn-primary"');?> + ' . $lang->project->create, '', 'class="btn btn-primary"');?>
diff --git a/module/project/model.php b/module/project/model.php index 9adf2e9f48..da8a3d3fed 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -119,12 +119,12 @@ class projectModel extends model */ public function saveState($projectID = 0, $projects = array()) { - if($projectID > 0) $this->session->set('project', (int)$projectID); - if($projectID == 0 and $this->cookie->lastProject) $this->session->set('project', (int)$this->cookie->lastProject); - if($projectID == 0 and $this->session->PRJ == '') $this->session->set('project', key($projects)); + if($projectID > 0) $this->session->set('PRJ', (int)$projectID); + if($projectID == 0 and $this->cookie->lastProject) $this->session->set('PRJ', (int)$this->cookie->lastProject); + if($projectID == 0 and $this->session->PRJ == '') $this->session->set('PRJ', key($projects)); if(!isset($projects[$this->session->PRJ])) { - $this->session->set('project', key($projects)); + $this->session->set('PRJ', key($projects)); if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false) $this->accessDenied(); } @@ -553,11 +553,11 @@ class projectModel extends model * @param array $products * @param int $queryID * @param string $actionURL - * @param string $type execution|execution + * @param string $type project|execution * @access public * @return void */ - public function buildProjectBuildSearchForm($products, $queryID, $actionURL, $type = 'execution') + public function buildProjectBuildSearchForm($products, $queryID, $actionURL, $type = 'project') { $this->loadModel('build'); diff --git a/module/qa/control.php b/module/qa/control.php index 8a6e0b0227..f262eef4fb 100644 --- a/module/qa/control.php +++ b/module/qa/control.php @@ -11,38 +11,6 @@ */ class qa extends control { - /** - * Project id. - * - * @var int - * @access public - */ - public $projectID; - - /** - * Construct. - * - * @access public - * @return void - */ - public function __construct() - { - parent::__construct(); - - /* Set qa menu group. */ - $this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0; - if(!$this->projectID) - { - foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa'; - $this->lang->noMenuModule[] = $this->app->rawModule; - } - else - { - $this->lang->qa->menu = $this->lang->projectQa->menu; - $this->lang->qa->subMenu = $this->lang->projectQa->subMenu; - } - } - /** * The index of qa, go to bug's browse page. * diff --git a/module/task/control.php b/module/task/control.php index e2df52fff4..8c2da8f404 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -39,6 +39,8 @@ class task extends control */ public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0) { + commonModel::setAppObjectID('execution', $executionID); + $executions = $this->execution->getPairs($this->session->PRJ); $executionID = $this->execution->saveState($executionID, $executions); diff --git a/module/testcase/control.php b/module/testcase/control.php index 138a998dcc..996f94a9c2 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -42,17 +42,22 @@ class testcase extends control /* Set test case menu group. */ $this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0; - if(!$this->projectID) + if($this->app->openApp == 'qa') { $this->app->loadConfig('qa'); foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa'; //$this->lang->noMenuModule[] = $this->app->rawModule; } - else + elseif($this->app->openApp == 'project') { $this->lang->testcase->menu = $this->lang->projectQa->menu; $this->lang->testcase->subMenu = $this->lang->projectQa->subMenu; } + elseif($this->app->openApp == 'execution') + { + $this->lang->testcase->menu = $this->lang->execution->qaMenu; + $this->lang->testcase->subMenu = ''; + } $this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase"))); @@ -247,6 +252,8 @@ class testcase extends control */ public function create($productID, $branch = '', $moduleID = 0, $from = '', $param = 0, $storyID = 0, $extras = '') { + if($this->app->openApp == 'execution') commonModel::setAppObjectID('execution', $this->session->execution); + $testcaseID = $from == 'testcase' ? $param : 0; $bugID = $from == 'bug' ? $param : 0; @@ -283,6 +290,7 @@ class testcase extends control setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, false); $response['locate'] = $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all¶m=0&orderBy=id_desc"); + if($this->app->openApp == 'execution') $response['locate'] = $this->createLink('execution', 'testcase', "executionID={$this->session->execution}&type=all"); $this->send($response); } if(empty($this->products)) $this->locate($this->createLink('product', 'create')); diff --git a/module/testcase/model.php b/module/testcase/model.php index 0618e1b2d9..b30bfef98b 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -80,7 +80,7 @@ class testcaseModel extends model ->add('fromBug', $bugID) ->setDefault('openedBy', $this->app->user->account) ->setDefault('openedDate', $now) - ->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa', 'project', $this->session->PRJ) + ->setIF($this->config->systemMode == 'new' && $this->app->openApp == 'project', 'project', $this->session->PRJ) ->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story)) ->remove('steps,expects,files,labels,stepType,forceNotReview') ->setDefault('story', 0) @@ -176,7 +176,7 @@ class testcaseModel extends model $data[$i] = new stdclass(); $data[$i]->product = $productID; - if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $data[$i]->project = $this->session->PRJ; + if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase == 'project') $data[$i]->project = $this->session->PRJ; $data[$i]->branch = $cases->branch[$i]; $data[$i]->module = $cases->module[$i]; $data[$i]->type = $cases->type[$i]; @@ -1664,10 +1664,14 @@ class testcaseModel extends model $projects = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($case->story)->fetchAll('project'); $projects = array_keys($projects); } - elseif($this->lang->navGroup->testcase == 'project' and empty($case->story)) + elseif($this->app->openApp == 'project' and empty($case->story)) { $projects = array($this->session->PRJ); } + elseif($this->app->openApp == 'execution' and empty($case->story)) + { + $projects = array($this->session->execution); + } if(!empty($projects)) { diff --git a/module/testtask/view/browse.html.php b/module/testtask/view/browse.html.php index 0fd7fac9aa..dcc38c6c01 100644 --- a/module/testtask/view/browse.html.php +++ b/module/testtask/view/browse.html.php @@ -40,9 +40,9 @@ $status = $this->session->testTaskVersionStatus; recPerPage}&pageID=1"?>
testtask->beginAndEnd;?> -
+
testtask->begin . "'");?>
testtask->to;?> -
+
testtask->end . "'");?>