Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
holan20180123
2021-03-19 15:41:20 +08:00
24 changed files with 107 additions and 255 deletions
-14
View File
@@ -382,7 +382,6 @@ class baseRouter
$this->setErrorHandler();
$this->setTimezone();
$this->startSession();
$this->setProject();
if($this->config->framework->multiSite) $this->setSiteCode() && $this->loadExtraConfig();
if($this->config->framework->autoConnectDB) $this->connectDB();
@@ -854,18 +853,6 @@ class baseRouter
}
}
/**
* 从Get里取project id 设置到session中。
* Get project id from Get and set it to session.
*
* @access public
* @return void
*/
public function setProject()
{
if(isset($_GET['PRJ'])) $this->session->set('PRJ', $_GET['PRJ']); //Set project id into session.
}
/**
* 从cookie中获取当前的group, 即URL锚链接'#open=?'。
* Get current group from cookie, original source is url '#open=?'.
@@ -1830,7 +1817,6 @@ class baseRouter
global $filter;
/* Remove these three params. */
unset($passedParams['PRJ']);
unset($passedParams['onlybody']);
unset($passedParams['HTTP_X_REQUESTED_WITH']);
+1 -1
View File
@@ -80,7 +80,7 @@ $lang->admin->safe->reasonList['birthday'] = 'Same as DOB';
$lang->admin->safe->modifyPasswordList[1] = 'Yes';
$lang->admin->safe->modifyPasswordList[0] = 'No';
$lang->admin->safe->loginCaptchaList[1] = 'Yes'
$lang->admin->safe->loginCaptchaList[1] = 'Yes';
$lang->admin->safe->loginCaptchaList[0] = 'No';
$lang->admin->safe->noticeMode = 'Password will be checked when a user logs in, or a user is added or edited.';
+1 -1
View File
@@ -32,7 +32,7 @@ class build extends control
commonModel::setAppObjectID('project', $projectID);
$executions = $this->execution->getPairs($projectID);
$executionID = key($executions);
$executionID = $executionID == 0 ? key($executions) : $executionID;
}
if(!empty($_POST))
+1 -1
View File
@@ -19,7 +19,7 @@
</div>
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
<table class='table table-form'>
<?php if($projectID != 0):?>
<?php if($openApp == 'project'):?>
<tr>
<th><?php echo $lang->executionCommon;?></th>
<td><?php echo html::select('execution', $executions, $executionID, "onchange='loadProducts(this.value);' class='form-control chosen' required");?></td>
+11 -5
View File
@@ -133,7 +133,7 @@ list($executionModule, $executionMethod) = explode('-', $config->executionLink);
/* Main menu. */
$lang->mainNav = new stdclass();
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> My|my|index|';
$lang->mainNav->product = "<i class='icon icon-menu-product'></i> Product|$productModule|$productMethod|";
$lang->mainNav->product = "<i class='icon icon-product'></i> Product|$productModule|$productMethod|";
if($config->systemMode == 'new')
{
$lang->mainNav->project = "<i class='icon icon-project'></i> Project|$projectModule|$projectMethod|";
@@ -182,7 +182,7 @@ $lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|programID=%s");
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|programID=%s");
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=ID%s", 'alias' => 'addwhitelist');
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|programID=%s", 'alias' => 'addwhitelist');
/* Scrum menu. */
$lang->product = new stdclass();
@@ -192,7 +192,7 @@ $lang->product->homeMenu->list = array('link' => $lang->productCommon . '|produc
$lang->product->menu = new stdclass();
$lang->product->menu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->menu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->menu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
@@ -213,7 +213,7 @@ $lang->release = new stdclass();
$lang->branch = new stdclass();
$lang->productplan = new stdclass();
$lang->release->menu = $lang->product->viewMenu;
$lang->release->menu = $lang->product->menu;
$lang->branch->menu = $lang->product->menu;
$lang->productplan->menu = $lang->product->menu;
@@ -367,6 +367,12 @@ $lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|executio
$lang->execution->subMenu->more->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s');
$lang->execution->subMenu->more->view = array('link' => 'Overview|execution|view|executionID=%s', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
$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', 'alias' => 'create');
$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
$lang->execution->dividerMenu = ',execution,programplan,executionbuild,story,doc,other,';
$lang->task = new stdclass();
@@ -859,7 +865,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|project={PROJECT}', 'subModule' => 'story', 'alias' => 'story,track');
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|', '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';
+12 -42
View File
@@ -182,7 +182,7 @@ $lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
$lang->personnel->menu->invest = array('link' => "投入人员|personnel|invest|programID=%s");
$lang->personnel->menu->accessible = array('link' => "可访问人员|personnel|accessible|programID=%s");
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|objectID=%s", 'alias' => 'addwhitelist');
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|programID=%s", 'alias' => 'addwhitelist');
/* Scrum menu. */
$lang->product = new stdclass();
@@ -383,19 +383,18 @@ $lang->qa->menu = new stdclass();
$lang->qa->menu->index = array('link' => '仪表盘|qa|index');
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto');
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite,caselib', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testreport', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->qa->subMenu = new stdclass();
$lang->qa->subMenu->testcase = new stdclass();
$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->feature = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testcase,tree,story,testtask');
$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();
$lang->qa->subMenu->testtask->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult');
$lang->qa->subMenu->testtask->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
$lang->qa->subMenu->testtask->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,edit');
$lang->qa->subMenu->automation = new stdclass();
$lang->qa->subMenu->automation->browse = array('link' => '介绍|automation|browse|productID=%s', 'alias' => '');
@@ -406,67 +405,38 @@ $lang->qa->subMenu->automation->browse = array('link' => '介绍|automation
$lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->menu = $lang->qa->menu;
$lang->bug->subMenu = $lang->qa->subMenu;
$lang->bug->menu->index = array('link' => '仪表盘|qa|index');
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->bug->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->bug->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testcase = new stdclass();
$lang->testcase->menu = new stdclass();
$lang->testcase->menu = $lang->qa->menu;
$lang->testcase->subMenu = $lang->qa->subMenu;
$lang->testcase->menu->index = array('link' => '仪表盘|qa|index');
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story', 'class' => 'dropdown dropdown-hover');
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testcase->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testtask = new stdclass();
$lang->testtask->menu = new stdclass();
$lang->testtask->menu = $lang->qa->menu;
$lang->testtask->subMenu = $lang->qa->subMenu;
$lang->testtask->menu->index = array('link' => '仪表盘|qa|index');
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testtask->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testtask->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testtask->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testsuite = new stdclass();
$lang->testsuite->menu = new stdclass();
$lang->testsuite->menu = $lang->qa->menu;
$lang->testsuite->subMenu = $lang->qa->subMenu;
$lang->testsuite->menu->index = array('link' => '仪表盘|qa|index');
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testsuite->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite', 'class' => 'dropdown dropdown-hover');
$lang->testsuite->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testsuite->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testreport = new stdclass();
$lang->testreport->menu = new stdclass();
$lang->testreport->menu = $lang->qa->menu;
$lang->testreport->subMenu = $lang->qa->subMenu;
$lang->testreport->menu->index = array('link' => '仪表盘|qa|index');
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testreport->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testreport->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testreport', 'class' => 'dropdown dropdown-hover');
$lang->testreport->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->caselib = new stdclass();
$lang->caselib->menu = new stdclass();
$lang->caselib->menu = $lang->qa->menu;
$lang->caselib->subMenu = $lang->qa->subMenu;
$lang->caselib->menu->index = array('link' => '仪表盘|qa|index');
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'caselib', 'class' => 'dropdown dropdown-hover');
$lang->caselib->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->caselib->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->automation = new stdclass();
$lang->automation->menu = new stdclass();
$lang->automation->menu = $lang->qa->menu;
$lang->automation->subMenu = $lang->qa->subMenu;
$lang->automation->menu->index = array('link' => '仪表盘|qa|index');
$lang->automation->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->automation->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->automation->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testreport', 'class' => 'dropdown dropdown-hover');
$lang->automation->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->ci = new stdclass();
$lang->ci->menu = new stdclass();
@@ -867,7 +837,7 @@ $lang->menu = new stdclass();
$lang->menu->scrum = new stdclass();
$lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}';
$lang->menu->scrum->execution = "$lang->executionCommon|project|execution|projectID={PROJECT}";
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|projectID={PROJECT}', 'alias' => 'story,track');
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|', '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';
+40 -41
View File
@@ -186,9 +186,9 @@ class execution extends control
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('executionList', $uri);
$this->app->session->set('taskList', $uri, 'execution');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('executionList', $uri, 'execution');
/* Process the order by field. */
if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_desc';
@@ -270,8 +270,8 @@ class execution extends control
$executionID = $execution->id;
/* Save session. */
$this->app->session->set('taskList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true));
$this->app->session->set('taskList', $this->app->getURI(true), 'execution');
$this->app->session->set('storyList', $this->app->getURI(true), 'product');
/* Header and session. */
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->task;
@@ -493,8 +493,8 @@ class execution extends control
}
/* Save session. */
$this->app->session->set('taskList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true));
$this->app->session->set('taskList', $this->app->getURI(true), 'execution');
$this->app->session->set('storyList', $this->app->getURI(true), 'product');
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->importTask;
$this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name);
@@ -535,9 +535,9 @@ class execution extends control
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('bugList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('executionList', $uri);
$this->app->session->set('bugList', $uri, 'qa');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('executionList', $uri, 'execution');
$this->loadModel('bug');
$executions = $this->execution->getPairs(0, 'all', 'nocode');
@@ -721,7 +721,7 @@ class execution extends control
}
/* Save session. */
$this->app->session->set('storyList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true), 'product');
/* Process the order by field. */
if(!$orderBy) $orderBy = $this->cookie->executionStoryOrder ? $this->cookie->executionStoryOrder : 'pri';
@@ -855,7 +855,7 @@ class execution extends control
$this->loadModel('user');
/* Save session. */
$this->session->set('bugList', $this->app->getURI(true));
$this->session->set('bugList', $this->app->getURI(true), 'qa');
$type = strtolower($type);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
@@ -963,7 +963,7 @@ class execution extends control
{
/* Load module and set session. */
$this->loadModel('testtask');
$this->session->set('buildList', $this->app->getURI(true));
$this->session->set('buildList', $this->app->getURI(true), 'execution');
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1028,7 +1028,7 @@ class execution extends control
$this->loadModel('testtask');
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1402,7 +1402,7 @@ class execution extends control
$isSprint = true;
if($this->config->systemMode == 'new')
{
$project = $this->project->getById($this->session->PRJ);
$project = $this->project->getById($execution->project);
if($project->model == 'scrum')
{
unset($this->lang->execution->endList[62]);
@@ -1431,8 +1431,8 @@ class execution extends control
$this->view->title = $title;
$this->view->position = $position;
$this->view->executions = $executions;
$this->view->execution = $execution;
$this->view->executions = $executions;
$this->view->execution = $execution;
$this->view->poUsers = $poUsers;
$this->view->pmUsers = $pmUsers;
$this->view->qdUsers = $qdUsers;
@@ -1718,7 +1718,6 @@ class execution extends control
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
$this->app->loadLang('program');
$this->session->PRJ = $execution->project;
/* Execution not found to prevent searching for .*/
if(!isset($this->executions[$execution->id])) $this->executions = $this->execution->getPairs($execution->execution, 'all', 'nocode');
@@ -1776,9 +1775,9 @@ class execution extends control
{
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('bugList', $uri);
$this->app->session->set('taskList', $uri, 'execution');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('bugList', $uri, 'qa');
/* Compatibility IE8*/
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
@@ -1835,11 +1834,11 @@ class execution extends control
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('executionList', $uri);
$this->app->session->set('caseList', $uri);
$this->app->session->set('bugList', $uri);
$this->app->session->set('taskList', $uri, 'execution');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('executionList', $uri, 'execution');
$this->app->session->set('caseList', $uri, 'qa');
$this->app->session->set('bugList', $uri, 'qa');
if($type === 'json') die(helper::jsonEncode4Parse($tree, JSON_HEX_QUOT | JSON_HEX_APOS));
@@ -1973,7 +1972,7 @@ class execution extends control
{
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('storyList', $uri);
$this->app->session->set('storyList', $uri, 'product');
/* Compatibility IE8*/
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
@@ -2260,7 +2259,7 @@ class execution extends control
$browseLink = $this->createLink('execution', 'story', "executionID=$executionID");
if($execution->type == 'project') $browseLink = $this->createLink('projectstory', 'story');
$this->session->set('storyList', $this->app->getURI(true)); // Save session.
$this->session->set('storyList', $this->app->getURI(true), 'product'); // Save session.
if($execution->type != 'execution') $this->execution->setMenu($this->executions, $execution->id); // Set menu.
if(empty($products))
@@ -2430,16 +2429,16 @@ class execution extends control
{
/* Save session. */
$uri = $this->app->getURI(true);
$this->session->set('productList', $uri);
$this->session->set('productPlanList', $uri);
$this->session->set('releaseList', $uri);
$this->session->set('storyList', $uri);
$this->session->set('executionList', $uri);
$this->session->set('taskList', $uri);
$this->session->set('buildList', $uri);
$this->session->set('bugList', $uri);
$this->session->set('caseList', $uri);
$this->session->set('testtaskList', $uri);
$this->session->set('productList', $uri, 'product');
$this->session->set('productPlanList', $uri, 'product');
$this->session->set('releaseList', $uri, 'product');
$this->session->set('storyList', $uri, 'product');
$this->session->set('executionList', $uri, 'execution');
$this->session->set('taskList', $uri, 'execution');
$this->session->set('buildList', $uri, 'execution');
$this->session->set('bugList', $uri, 'qa');
$this->session->set('caseList', $uri, 'qa');
$this->session->set('testtaskList', $uri, 'qa');
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
@@ -2682,7 +2681,7 @@ class execution extends control
$this->app->loadLang('programplan');
$from = $this->app->openApp;
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true));
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true), 'execution');
if($from == 'project') $this->lang->navGroup->execution = 'project';
/* Load pager and get tasks. */
@@ -2793,9 +2792,9 @@ class execution extends control
unset($fields[$key]);
}
$projectID = $from == 'project' ? $this->session->PRJ : 0;
$projectID = $from == 'project' ? $this->session->project : 0;
$executionStats = $this->project->getStats($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc');
$users = $this->loadModel('user')->getPairs('noletter');
$users = $this->loadModel('user')->getPairs('noletter');
foreach($executionStats as $i => $execution)
{
$execution->PM = zget($users, $execution->PM);
+2 -2
View File
@@ -113,7 +113,7 @@ class executionModel extends model
if($methodName == 'all') $label = $this->lang->execution->allExecutions;
if($methodName == 'create' and $moduleName == 'execution') $label = $this->lang->execution->create;
foreach($this->lang->execution->viewMenu as $key => $menu) common::setMenuVars($this->lang->execution->viewMenu, $key, $executionID);
foreach($this->lang->execution->menu as $key => $menu) common::setMenuVars($this->lang->execution->menu, $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)
@@ -1855,7 +1855,7 @@ class executionModel extends model
$bugToTasks = fixer::input('post')->get();
$bugs = $this->bug->getByList(array_keys($bugToTasks->import));
$projectID = $this->loadModel('execution')->getProjectID($executionID);
$projectID = $this->loadModel('task')->getProjectID($executionID);
foreach($bugToTasks->import as $key => $value)
{
$bug = zget($bugs, $key, '');
+15 -7
View File
@@ -35,6 +35,14 @@
}
}
$minWidth = (count($visibleFields) > 5) ? 'w-150px' : '';
$name = $from == 'execution' ? 'execName' : 'name';
$code = $from == 'execution' ? 'execCode' : 'code';
$PM = $from == 'execution' ? 'execPM' : 'PM';
$type = $from == 'execution' ? 'execType' : 'type';
$desc = $from == 'execution' ? 'execDesc' : 'desc';
$status = $from == 'execution' ? 'execStatus' : 'status';
?>
<form class='main-form' method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
<div class="table-responsive">
@@ -42,17 +50,17 @@
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $from == 'execution' ? $lang->execution->execName : $lang->execution->name;?></th>
<th class='w-150px required'><?php echo $from == 'execution' ? $lang->execution->execCode : $lang->execution->code;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $from == 'execution' ? $lang->execution->execPM : $lang->execution->PM;?></th>
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->$name;?></th>
<th class='w-150px required'><?php echo $lang->execution->$code;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $lang->execution->$PM;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden') . zget($requiredFields, 'PO', '', ' required');?>'><?php echo $lang->execution->PO;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden') . zget($requiredFields, 'QD', '', ' required');?>'><?php echo $lang->execution->QD;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden') . zget($requiredFields, 'RD', '', ' required');?>'><?php echo $lang->execution->RD;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $from == 'execution' ? $lang->execution->execType : $lang->execution->type;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden') . zget($requiredFields, 'status', '', ' required');?>'><?php echo $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $lang->execution->$type;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden') . zget($requiredFields, 'status', '', ' required');?>'><?php echo $lang->execution->$status;?></th>
<th class='w-110px required'><?php echo $lang->execution->begin;?></th>
<th class='w-110px required'><?php echo $lang->execution->end;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'> <?php echo $from == 'execution' ? $lang->execution->execDesc : $lang->execution->desc;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->execution->$desc;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'teamname', ' hidden') . zget($requiredFields, 'teamname', '', ' required');?>'><?php echo $lang->execution->teamname;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'days', ' hidden') . zget($requiredFields, 'days', '', ' required');?>'><?php echo $lang->execution->days;?></th>
</tr>
@@ -69,7 +77,7 @@
<td><?php echo sprintf('%03d', $executionID) . html::hidden("executionIDList[$executionID]", $executionID);?></td>
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "class='form-control'");?></td>
<td><?php echo html::input("codes[$executionID]", $executions[$executionID]->code, "class='form-control'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$executionID]", $qdUsers, $executions[$executionID]->QD, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$executionID]", $rdUsers, $executions[$executionID]->RD, "class='form-control chosen'");?></td>
+1 -1
View File
@@ -130,7 +130,7 @@ class product extends control
$this->loadModel('execution');
/* Set product, module and query. */
$productID = $this->app->rawModule != 'projectstory' ? $this->product->saveState($productID, $this->products) : $productID;
$productID = $this->app->openApp != 'projectstory' ? $this->product->saveState($productID, $this->products) : $productID;
$branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch;
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true);
+1 -1
View File
@@ -16,7 +16,7 @@ js::set('programID', $programID);
js::set('browseType', $browseType);
?>
<style>
.project-type-label.label-outline {width: 47px;}
.project-type-label.label-outline {width: 50px;}
</style>
<div id="mainMenu" class="clearfix">
<div class="btn-toolBar pull-left">
+2 -2
View File
@@ -389,7 +389,7 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
$locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('view', "projectID=$projectID");
$locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('view', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programProject') $locateLink = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "projectID=$projectID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
@@ -1289,7 +1289,7 @@ class project extends control
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
if($diffProducts) $this->loadModel('action')->create('project', $projectID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
$locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('manageProducts', "projectID=$projectID");
$locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('manageProducts', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programproject') $locateLink = $this->session->programProject ? $this->session->programProject : inLink('programProject', "projectID=$projectID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
+1 -1
View File
@@ -5,7 +5,7 @@ $(function()
if(executions.length == 0)
{
alert(createExecution);
location.href = createLink('execution', 'create', 'productID=&executionID=&copyExecutionID=&planID=&confirm=&projectID=' + projectID);
location.href = createLink('execution', 'create', 'projectID=' + projectID);
return false;
}
});
+8 -9
View File
@@ -34,7 +34,6 @@ class projectModel extends model
{
echo(js::alert($this->lang->project->accessDenied));
unset($_SESSION['PRJ']);
die(js::locate(helper::createLink('project', 'index')));
}
@@ -115,16 +114,16 @@ class projectModel extends model
*/
public function saveState($projectID = 0, $projects = array())
{
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]))
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->project == '') $this->session->set('project', key($projects));
if(!isset($projects[$this->session->project]))
{
$this->session->set('PRJ', key($projects));
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false) $this->accessDenied();
$this->session->set('project', key($projects));
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false) $this->accessDenied();
}
return $this->session->PRJ;
return $this->session->project;
}
/*
@@ -1570,7 +1569,7 @@ class projectModel extends model
}
/* In the case of the waterfall model, calculate the sub-stage. */
$project = $this->getByID($this->session->PRJ);
$project = $this->getByID($projectID);
if($project and $project->model == 'waterfall')
{
foreach($parents as $id => $execution)
+1 -1
View File
@@ -17,7 +17,7 @@ js::set('programID', $programID);
js::set('browseType', $browseType);
?>
<style>
.project-type-label.label-outline {width: 47px;}
.project-type-label.label-outline {width: 50px;}
</style>
<div id="mainMenu" class="clearfix">
<?php if($this->config->systemMode == 'new'):?>
+1 -6
View File
@@ -44,12 +44,7 @@ class projectStory extends control
*/
public function story($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->session->set('storyList', $this->app->getURI(true));
$this->lang->story->title = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->title);
$this->lang->story->createRequirement = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->createRequirement);
$this->lang->story->createStory = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->createStory);
$this->lang->story->noStory = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->noStory);
$this->session->set('storyList', $this->app->getURI(true), 'project');
echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&from=project");
}
+4 -7
View File
@@ -1453,14 +1453,11 @@ class story extends control
$this->lang->navGroup->story = $from;
if($from == 'project')
$moduleIndex = array_search('story', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
if($from == 'qa')
{
$moduleIndex = array_search('story', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
}
else
{
$this->app->loadConfig('qa');
$this->loadModel('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
}
+2 -2
View File
@@ -804,8 +804,8 @@ class task extends control
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->session->set('estimateList', $this->app->getURI(true));
if(isonlybody() && $this->config->requestType != 'GET') $this->session->set('estimateList', $this->app->getURI(true) . '?onlybody=yes');
$this->session->set('estimateList', $this->app->getURI(true), 'execution');
if(isonlybody() && $this->config->requestType != 'GET') $this->session->set('estimateList', $this->app->getURI(true) . '?onlybody=yes', 'execution');
$this->view->task = $this->task->getById($taskID);
$this->view->estimates = $this->task->getTaskEstimate($taskID);
-13
View File
@@ -28,20 +28,7 @@ class testcaseModel extends model
public function setMenu($products, $productID, $branch = 0, $moduleID = 0, $suiteID = 0, $orderBy = 'id_desc')
{
$this->loadModel('product')->setMenu($products, $productID, $branch, $moduleID, 'case');
$selectHtml = $this->product->select($products, $productID, 'testcase', 'browse', '', $branch, $moduleID, 'case');
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testcase->menu as $key => $menu)
{
if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testcase', $key, $productID);
-9
View File
@@ -23,16 +23,7 @@ class testreportModel extends model
public function setMenu($products, $productID, $branch = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', $this->session->PRJ, $branch);
/* Remove branch. */
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "<div class='btn-group'>")) . '</div>';
$pageNav = $selectHtml;
$pageActions = '';
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testreport != 'qa') $this->loadModel('qa')->setSubMenu('testreport', $key, $productID);
-14
View File
@@ -24,21 +24,7 @@ class testsuiteModel extends model
public function setMenu($products, $productID)
{
$this->loadModel('product')->setMenu($products, $productID);
$selectHtml = $this->select($products, $productID, 'testsuite', 'browse');
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "<div class='btn-group'>")) . '</div>';
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testsuite->menu as $key => $value)
{
if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testsuite', $key, $productID);
+1
View File
@@ -152,6 +152,7 @@ class testtask extends control
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
$this->loadModel('testtask')->setUnitMenu($this->products, $productID);
$this->lang->testtask->menuOrder = $this->lang->testcase->menuOrder;
/* Load pager. */
if($browseType == 'newest') $recPerPage = '10';
-75
View File
@@ -24,42 +24,8 @@ class testtaskModel extends model
public function setMenu($products, $productID, $branch = 0, $testtask = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browse', '', $branch);
if($testtask and $this->app->viewType != 'mhtml')
{
$testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'), 0, 0, $this->session->PRJ);
if(!isset($testtasks[$testtask])) $testtasks[$testtask] = $this->getById($testtask);
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<div class='btn-group'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn'>" . $testtasks[$testtask]->name . " <span class='caret'></span></a>";
$selectHtml .= "<ul class='dropdown-menu'>";
foreach($testtasks as $testtask) $selectHtml .= '<li>' . html::a(helper::createLink('testtask', 'cases', "taskID=$testtask->id"), "<i class='icon icon-file-o'></i> {$testtask->name}") . '</li>';
$selectHtml .= "</ul>";
$selectHtml .= "</div>";
$selectHtml .= "</div>";
$this->lang->TRActions = '';
if(common::hasPriv('testtask', 'view')) $this->lang->TRActions .= html::a(helper::createLink('testtask', 'view', "taskID={$testtask->id}"), "<i class='icon icon-file-text'> </i>" . $this->lang->testtask->view, '', "class='btn'");
if(common::hasPriv('testreport', 'browse')) $this->lang->TRActions .= html::a(helper::createLink('testreport', 'browse', "objectID=$productID&objectType=product&extra={$testtask->id}"), "<i class='icon icon-flag'> </i>" . $this->lang->testtask->reportField, '', "class='btn'");
}
$this->app->loadLang('qa');
$productIndex = $selectHtml;
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testtask != 'qa') $this->loadModel('qa')->setSubMenu('testtask', $key, $productID);
@@ -93,48 +59,7 @@ class testtaskModel extends model
public function setUnitMenu($products, $productID, $branch = 0, $testtask = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browseUnits', '', $branch);
if($testtask and $this->app->viewType != 'mhtml')
{
$testtasks = $this->getProductUnitTasks($productID, 'all', 'id_desc');
if(!isset($testtasks[$testtask])) $testtasks[$testtask] = $this->getById($testtask);
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<div class='btn-group'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn'>" . $testtasks[$testtask]->name . " <span class='caret'></span></a>";
$selectHtml .= "<ul class='dropdown-menu'>";
foreach($testtasks as $testtask) $selectHtml .= '<li>' . html::a(helper::createLink('testtask', 'unitCases', "taskID=$testtask->id"), "<i class='icon icon-file-o'></i> {$testtask->name}") . '</li>';
$selectHtml .= "</ul>";
$selectHtml .= "</div>";
$selectHtml .= "</div>";
}
$this->app->loadLang('qa');
$productIndex = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '</div></div>';
$productIndex .= $selectHtml;
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
else
{
if($this->config->global->flow == 'full')
{
$this->app->loadLang('qa');
$pageNav = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '</div></div>';
}
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
if($this->config->global->flow != 'full') $this->lang->testtask->menu = new stdclass();
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testtask', $key, $productID);
@@ -96,6 +96,8 @@ $(function()
{
$('#<?php echo $browseType?>UnitTab').addClass('selected');
$('#browseunitsTab').addClass('btn-active-text');
$('#navbar li[data-id="testtask"]').removeClass('active');
$('#navbar li[data-id="testcase"]').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>