From a5827af318649c95b2479a3f93cf9ca1abbbc48b Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Fri, 12 Mar 2021 09:35:14 +0800 Subject: [PATCH 10/33] * Finish task #36473. --- db/update15.0.sql | 2 +- module/upgrade/control.php | 1 + module/upgrade/model.php | 18 +++++++++++++++++- module/upgrade/view/mergeprogram.html.php | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/db/update15.0.sql b/db/update15.0.sql index 4897ade071..812b39f929 100644 --- a/db/update15.0.sql +++ b/db/update15.0.sql @@ -132,7 +132,7 @@ ALTER TABLE `zt_task` ADD `realDuration` int(11) NOT NULL AFTER `closedDate`; ALTER TABLE `zt_task` ADD `designVersion` smallint(6) unsigned NOT NULL AFTER `storyVersion`; ALTER TABLE `zt_burn` ADD `storyPoint` float NOT NULL AFTER `consumed`; -ALTER TABLE `zt_burn` ADD `product` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `project`; +ALTER TABLE `zt_burn` ADD `product` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `execution`; -- DROP TABLE IF EXISTS `zt_taskspec`; CREATE TABLE IF NOT EXISTS `zt_taskspec` ( diff --git a/module/upgrade/control.php b/module/upgrade/control.php index ab7d68fbd4..b2fa00c40f 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -199,6 +199,7 @@ class upgrade extends control $this->app->loadLang('program'); $this->app->loadLang('project'); $this->app->loadLang('product'); + $this->app->loadConfig('execution'); if($_POST) { diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 90df57c4de..0d5a17f99b 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4179,6 +4179,22 @@ class upgradeModel extends model $this->dao->replace(TABLE_PROJECTSTORY)->data($projectStory)->exec(); } + /* Put sprint cases into project case table. */ + $sprintCases = $this->dao->select('t2.case,t2.version,t1.product,t1.execution as project') + ->from(TABLE_TESTTASK)->alias('t1') + ->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.id = t2.task') + ->where('t1.execution')->in($sprintIdList) + ->fetchAll(); + + foreach($sprintCases as $projectCase) + { + $projectCase->order = $projectCase * 5; + $this->dao->replace(TABLE_PROJECTCASE)->data($projectCase)->exec(); + + $projectCase->project = $projectID; + $this->dao->replace(TABLE_PROJECTCASE)->data($projectCase)->exec(); + } + /* Compute sprint path and grade. */ $sprints = $this->dao->select('id, type, acl')->from(TABLE_PROJECT)->where('id')->in($sprintIdList)->fetchAll(); foreach($sprints as $sprint) @@ -4285,7 +4301,7 @@ class upgradeModel extends model /* Get all actor in sprint and product. */ foreach($productIdList as $productID) $productIdList[$productID] = ",{$productID},"; - $whiteList = $this->dao->select('actor')->from(TABLE_ACTION)->where('project')->in($sprintIdList)->orWhere('product')->in($productIdList)->fetchPairs('actor', 'actor'); + $whiteList = $this->dao->select('actor')->from(TABLE_ACTION)->where('execution')->in($sprintIdList)->orWhere('product')->in($productIdList)->fetchPairs('actor', 'actor'); $whiteList = array_diff($whiteList, $teams); /* Get all white list in sprint and product. */ diff --git a/module/upgrade/view/mergeprogram.html.php b/module/upgrade/view/mergeprogram.html.php index 0491a52d9e..69482dfe59 100644 --- a/module/upgrade/view/mergeprogram.html.php +++ b/module/upgrade/view/mergeprogram.html.php @@ -11,7 +11,7 @@ */ ?> -project->weekend);?> +execution->weekend);?>
    - app->getClientLang() == 'en') ? $lang->misc->enApi : $lang->misc->api;?> + app->getClientLang() == 'en') ? $config->misc->enApi : $config->misc->api;?> $label):?>
  • From 8ad207c3ecc688297f305af856abbc7be08bbe07 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 12 Mar 2021 09:55:39 +0800 Subject: [PATCH 14/33] * Fix bug. --- module/bug/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index e5e82ed1a5..284a08a5f7 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -85,7 +85,7 @@ class bugModel extends model ->remove('files, labels,uid,oldTaskID,contactListMenu') ->get(); - if($bug->execution !== 0) $bug->project = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('parent'); + if($bug->execution != 0) $bug->project = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('parent'); /* Check repeat bug. */ $result = $this->loadModel('common')->removeDuplicate('bug', $bug, "product={$bug->product}"); @@ -185,7 +185,7 @@ class bugModel extends model $bug->browser = $data->browsers[$i]; $bug->keywords = $data->keywords[$i]; - if($bug->execution !== 0) $bug->project = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('parent'); + if($bug->execution != 0) $bug->project = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('parent'); /* Assign the bug to the person in charge of the module. */ if(!empty($moduleOwners[$bug->module])) From 0149dd2aeeb7a9ab473a49f2ec60c2f2b70c8274 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 12 Mar 2021 09:58:22 +0800 Subject: [PATCH 15/33] * Finish task #36489. --- module/project/view/ajaxgetdropmenu.html.php | 2 +- module/user/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/view/ajaxgetdropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php index 602746a989..ec39df6304 100644 --- a/module/project/view/ajaxgetdropmenu.html.php +++ b/module/project/view/ajaxgetdropmenu.html.php @@ -50,7 +50,7 @@ foreach($projects as $project) ?>
diff --git a/module/user/control.php b/module/user/control.php index ef820738ab..590db35134 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -39,7 +39,7 @@ class user extends control */ public function view($userID) { - $this->locate($this->createLink('user', 'todo', "userID=$userID")); + $this->locate($this->createLink('user', 'todo', "userID=$userID&type=all")); } /** From c55c18093cda5840660b2eccdb36e67581ee1bcf Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 12 Mar 2021 10:16:49 +0800 Subject: [PATCH 16/33] * Fix the problem of creating bugs. --- module/product/control.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 20da05e565..a7c0318fb4 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -837,28 +837,29 @@ class product extends control } /** - * AJAX: get projects of a product in html select. + * AJAX: get executions of a product in html select. * * @param int $productID - * @param int $projectID + * @param int $executionID + * @param int $branch * @param string $number * @access public * @return void */ - public function ajaxGetProjects($productID, $projectID = 0, $branch = 0, $number = '') + public function ajaxGetExecutions($productID, $executionID = 0, $branch = 0, $number = '') { - $projects = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : $branch, 'id_desc', $projectID); - if($this->app->getViewType() == 'json') die(json_encode($projects)); + $executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : $branch, 'id_desc', $executionID); + if($this->app->getViewType() == 'json') die(json_encode($executions)); if($number === '') { - die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProjectRelated(this.value)'")); + die(html::select('execution', $executions, $executionID, "class='form-control' onchange='loadExecutionRelated(this.value)'")); } else { - $projectName = "projects[$number]"; - $projects = empty($projects) ? array('' => '') : $projects; - die(html::select($projectName, $projects, '', "class='form-control' onchange='loadProjectBuilds($productID, this.value, $number)'")); + $executionsName = "executions[$number]"; + $executions = empty($executions) ? array('' => '') : $executions; + die(html::select($executionsName, $executions, '', "class='form-control' onchange='loadProjectBuilds($productID, this.value, $number)'")); } } From 3bd0242fdeb7baa0647defcd3191c164db37acaa Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 12 Mar 2021 10:19:11 +0800 Subject: [PATCH 17/33] * Finish task#36338. --- module/execution/control.php | 2 +- module/execution/model.php | 28 ++++++++++++++-------------- module/index/js/index.js | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 0fc4ed0ff9..56d61823ba 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2526,7 +2526,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"; diff --git a/module/execution/model.php b/module/execution/model.php index 73826c8092..a2c6999a53 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3488,10 +3488,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 +3499,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; } /** diff --git a/module/index/js/index.js b/module/index/js/index.js index 26aa5a2f33..59dfd11733 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -518,7 +518,7 @@ function getExecutions() $.ajax( { - url: createLink('project', 'ajaxGetRecentExecutions'), + url: createLink('execution', 'ajaxGetRecentExecutions'), dataType: 'html', type: 'post', success: function(data) From 366f0608c358d8c8cf18883fdf4e35b5b47fa5f7 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 12 Mar 2021 10:32:19 +0800 Subject: [PATCH 18/33] * Adjust group moduel. --- module/automation/control.php | 2 +- module/automation/lang/zh-cn.php | 2 +- module/group/lang/resource.php | 52 ++++++++++++++++++-------------- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/module/automation/control.php b/module/automation/control.php index 886dccfa05..c81ec5bedf 100644 --- a/module/automation/control.php +++ b/module/automation/control.php @@ -64,7 +64,7 @@ class automation extends control $this->automation->setMenu($this->products, $productID, $branch); $this->view->title = $this->lang->automation->common; - $this->view->position[] = $this->lang->automation->index; + $this->view->position[] = $this->lang->automation->browse; $this->display(); } } diff --git a/module/automation/lang/zh-cn.php b/module/automation/lang/zh-cn.php index 6ce6d1c432..246a9d540f 100644 --- a/module/automation/lang/zh-cn.php +++ b/module/automation/lang/zh-cn.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ $lang->automation->common = '自动化测试'; -$lang->automation->index = '首页'; +$lang->automation->browse = '首页'; $lang->automation->description = '自动化测试解决方案'; $lang->automation->ztf = 'ZTF自动化测试管理框架'; diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index dff69058d3..d8bd60adda 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -34,33 +34,34 @@ $lang->moduleOrder[80] = 'testcase'; $lang->moduleOrder[85] = 'testtask'; $lang->moduleOrder[90] = 'testsuite'; $lang->moduleOrder[95] = 'testreport'; -$lang->moduleOrder[100] = 'caselib'; +$lang->moduleOrder[100] = 'caselib'; +$lang->moduleOrder[105] = 'automation'; -$lang->moduleOrder[105] = 'doc'; -$lang->moduleOrder[110] = 'report'; +$lang->moduleOrder[110] = 'doc'; +$lang->moduleOrder[115] = 'report'; -$lang->moduleOrder[115] = 'company'; -$lang->moduleOrder[120] = 'dept'; -$lang->moduleOrder[125] = 'group'; -$lang->moduleOrder[130] = 'user'; +$lang->moduleOrder[120] = 'company'; +$lang->moduleOrder[125] = 'dept'; +$lang->moduleOrder[130] = 'group'; +$lang->moduleOrder[135] = 'user'; -$lang->moduleOrder[135] = 'admin'; -$lang->moduleOrder[140] = 'extension'; -$lang->moduleOrder[145] = 'custom'; -$lang->moduleOrder[150] = 'action'; +$lang->moduleOrder[140] = 'admin'; +$lang->moduleOrder[145] = 'extension'; +$lang->moduleOrder[150] = 'custom'; +$lang->moduleOrder[155] = 'action'; -$lang->moduleOrder[155] = 'mail'; -$lang->moduleOrder[160] = 'svn'; -$lang->moduleOrder[165] = 'git'; -$lang->moduleOrder[170] = 'search'; -$lang->moduleOrder[175] = 'tree'; -$lang->moduleOrder[180] = 'api'; -$lang->moduleOrder[185] = 'file'; -$lang->moduleOrder[190] = 'misc'; -$lang->moduleOrder[195] = 'backup'; -$lang->moduleOrder[200] = 'cron'; -$lang->moduleOrder[205] = 'dev'; -$lang->moduleOrder[210] = 'message'; +$lang->moduleOrder[160] = 'mail'; +$lang->moduleOrder[165] = 'svn'; +$lang->moduleOrder[170] = 'git'; +$lang->moduleOrder[175] = 'search'; +$lang->moduleOrder[180] = 'tree'; +$lang->moduleOrder[185] = 'api'; +$lang->moduleOrder[190] = 'file'; +$lang->moduleOrder[195] = 'misc'; +$lang->moduleOrder[200] = 'backup'; +$lang->moduleOrder[205] = 'cron'; +$lang->moduleOrder[210] = 'dev'; +$lang->moduleOrder[215] = 'message'; $lang->resource = new stdclass(); @@ -926,6 +927,11 @@ $lang->caselib->methodOrder[40] = 'exportTemplet'; $lang->caselib->methodOrder[45] = 'import'; $lang->caselib->methodOrder[50] = 'showImport'; +$lang->resource->automation = new stdclass(); +$lang->resource->automation->browse = 'browse'; + +$lang->automation->methodOrder[0] = 'browse'; + $lang->resource->repo = new stdclass(); $lang->resource->repo->browse = 'browse'; $lang->resource->repo->view = 'view'; From 79d200f692882c7f9bb753d5a74765aa44c5117e Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Fri, 12 Mar 2021 10:41:27 +0800 Subject: [PATCH 19/33] * Finish task #36447. --- module/caselib/model.php | 1 + module/testcase/model.php | 5 ++++- module/testsuite/model.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) 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/testcase/model.php b/module/testcase/model.php index 7556806d5e..c320f79521 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -45,7 +45,10 @@ class testcaseModel extends model foreach($this->lang->testcase->menu as $key => $menu) { if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testcase', $key, $productID); - common::setMenuVars($this->lang->testcase->menu, $key, $productID); + + $replace = $productID; + if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0; + common::setMenuVars($this->lang->testcase->menu, $key, $replace); } if($this->lang->navGroup->testcase == 'qa') diff --git a/module/testsuite/model.php b/module/testsuite/model.php index 2b4417049b..29277c1b7d 100644 --- a/module/testsuite/model.php +++ b/module/testsuite/model.php @@ -43,6 +43,7 @@ class testsuiteModel extends model { if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testsuite', $key, $productID); $replace = $productID; + if($this->lang->navGroup->testsuite == 'project' and $key == 'bug') $replace = 0; common::setMenuVars($this->lang->testsuite->menu, $key, $replace); } From 0b0cdcbda72dd98865a3cc5578ce9dd1b004df0e Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 12 Mar 2021 10:56:47 +0800 Subject: [PATCH 20/33] * Rename personnel. --- module/common/lang/de.php | 4 +- module/common/lang/en.php | 4 +- module/common/lang/fr.php | 4 +- module/common/lang/vi.php | 4 +- module/common/lang/zh-cn.php | 4 +- module/common/lang/zh-tw.php | 2 +- module/execution/control.php | 4 +- module/execution/lang/de.php | 2 +- module/execution/lang/en.php | 2 +- module/execution/lang/fr.php | 2 +- module/execution/lang/vi.php | 2 +- module/execution/lang/zh-cn.php | 2 +- module/execution/lang/zh-tw.php | 2 +- module/group/lang/resource.php | 26 +++---- module/personnel/control.php | 10 +-- module/personnel/lang/de.php | 6 +- module/personnel/lang/en.php | 6 +- module/personnel/lang/fr.php | 6 +- module/personnel/lang/vi.php | 6 +- module/personnel/lang/zh-cn.php | 6 +- module/personnel/lang/zh-tw.php | 6 +- module/personnel/model.php | 86 ++++++++++++------------ module/personnel/view/putinto.html.php | 4 +- module/personnel/view/whitelist.html.php | 4 +- module/product/control.php | 4 +- module/product/lang/de.php | 2 +- module/product/lang/en.php | 2 +- module/product/lang/fr.php | 2 +- module/product/lang/vi.php | 2 +- module/product/lang/zh-cn.php | 2 +- module/product/lang/zh-tw.php | 2 +- module/program/lang/zh-tw.php | 2 +- module/project/control.php | 4 +- module/project/lang/de.php | 2 +- module/project/lang/en.php | 2 +- module/project/lang/fr.php | 2 +- module/project/lang/vi.php | 2 +- module/project/lang/zh-cn.php | 2 +- module/project/lang/zh-tw.php | 2 +- 39 files changed, 119 insertions(+), 119 deletions(-) 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 9649086a87..c02cf126db 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'); 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/execution/control.php b/module/execution/control.php index 56d61823ba..c1a50c7c43 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2678,9 +2678,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"); } /** diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index bfb0e35db3..5ea630779c 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -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..57ca932cf4 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -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'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index f44e514127..8e7d0a4805 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -51,7 +51,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..e4cc78362e 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -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 = '剩余'; 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/group/lang/resource.php b/module/group/lang/resource.php index d8bd60adda..86e04ef99d 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -221,7 +221,7 @@ if($config->systemMode == 'new') $lang->resource->project->view = 'view'; $lang->resource->project->whitelist = 'whitelist'; $lang->resource->project->addWhitelist = 'addWhitelist'; - $lang->resource->project->unbindWhielist = 'unbindWhielist'; + $lang->resource->project->unbindWhitelist = 'unbindWhitelist'; $lang->resource->project->manageProducts = 'manageProducts'; $lang->resource->project->view = 'view'; $lang->resource->project->dynamic = 'dynamic'; @@ -249,24 +249,24 @@ if($config->systemMode == 'new') $lang->project->methodOrder[100] = 'view'; $lang->project->methodOrder[105] = 'whitelist'; $lang->project->methodOrder[110] = 'addWhitelist'; - $lang->project->methodOrder[115] = 'unbindWhielist'; + $lang->project->methodOrder[115] = 'unbindWhitelist'; $lang->project->methodOrder[120] = 'manageProducts'; $lang->project->methodOrder[125] = 'view'; $lang->project->methodOrder[130] = 'dynamic'; /* Personnel . */ $lang->resource->personnel = new stdclass(); - $lang->resource->personnel->accessible = 'accessible'; - $lang->resource->personnel->putInto = 'putInto'; - $lang->resource->personnel->whitelist = 'whitelist'; - $lang->resource->personnel->addWhitelist = 'addWhitelist'; - $lang->resource->personnel->unbindWhielist = 'unbindWhielist'; + $lang->resource->personnel->accessible = 'accessible'; + $lang->resource->personnel->invest = 'invest'; + $lang->resource->personnel->whitelist = 'whitelist'; + $lang->resource->personnel->addWhitelist = 'addWhitelist'; + $lang->resource->personnel->unbindWhitelist = 'unbindWhitelist'; $lang->personnel->methodOrder[5] = 'accessible'; - $lang->personnel->methodOrder[10] = 'putInto'; + $lang->personnel->methodOrder[10] = 'invest'; $lang->personnel->methodOrder[15] = 'whitelist'; $lang->personnel->methodOrder[20] = 'addWhitelist'; - $lang->personnel->methodOrder[25] = 'unbindWhielist'; + $lang->personnel->methodOrder[25] = 'unbindWhitelist'; /* Project Story. */ $lang->resource->projectstory = new stdclass(); @@ -340,7 +340,7 @@ $lang->resource->product->build = 'build'; $lang->resource->product->export = 'exportAction'; $lang->resource->product->whitelist = 'whitelist'; $lang->resource->product->addWhitelist = 'addWhitelist'; -$lang->resource->product->unbindWhielist = 'unbindWhielist'; +$lang->resource->product->unbindWhitelist = 'unbindWhitelist'; $lang->product->methodOrder[0] = 'index'; $lang->product->methodOrder[5] = 'browse'; @@ -361,7 +361,7 @@ $lang->product->methodOrder[80] = 'build'; $lang->product->methodOrder[85] = 'export'; $lang->product->methodOrder[90] = 'whitelist'; $lang->product->methodOrder[95] = 'addWhitelist'; -$lang->product->methodOrder[100] = 'unbindWhielist'; +$lang->product->methodOrder[100] = 'unbindWhitelist'; /* Branch. */ $lang->resource->branch = new stdclass(); @@ -577,7 +577,7 @@ $lang->resource->execution->storyKanban = 'storyKanban'; $lang->resource->execution->storySort = 'storySort'; $lang->resource->execution->whitelist = 'whitelist'; $lang->resource->execution->addWhitelist = 'addWhitelist'; -$lang->resource->execution->unbindWhielist = 'unbindWhielist'; +$lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; $lang->execution->methodOrder[0] = 'index'; @@ -629,7 +629,7 @@ $lang->execution->methodOrder[220] = 'storyKanban'; $lang->execution->methodOrder[225] = 'storySort'; $lang->execution->methodOrder[230] = 'whitelist'; $lang->execution->methodOrder[235] = 'addWhitelist'; -$lang->execution->methodOrder[240] = 'unbindWhielist'; +$lang->execution->methodOrder[240] = 'unbindWhitelist'; /* Task. */ $lang->resource->task = new stdclass(); diff --git a/module/personnel/control.php b/module/personnel/control.php index 2fbdf1a22d..e99a89f94c 100644 --- a/module/personnel/control.php +++ b/module/personnel/control.php @@ -70,12 +70,12 @@ class personnel extends control * @access public * @return void */ - public function putInto($programID = 0) + public function invest($programID = 0) { $this->setProgramNavMenu($programID); - $this->view->title = $this->lang->personnel->putInto; - $this->view->position[] = $this->lang->personnel->putInto; + $this->view->title = $this->lang->personnel->invest; + $this->view->position[] = $this->lang->personnel->invest; $this->view->inputPersonnel = $this->personnel->getInputPersonnel($programID); $this->display(); @@ -190,11 +190,11 @@ class personnel extends control * @access public * @return void */ - public function unbindWhielist($id = 0, $confirm = 'no') + public function unbindWhitelist($id = 0, $confirm = 'no') { if($confirm == 'no') { - die(js::confirm($this->lang->personnel->confirmDelete, inLink('unbindWhielist',"id=$id&confirm=yes"))); + die(js::confirm($this->lang->personnel->confirmDelete, inLink('unbindWhitelist',"id=$id&confirm=yes"))); } else { diff --git a/module/personnel/lang/de.php b/module/personnel/lang/de.php index ab1aa7622b..3390cdb972 100644 --- a/module/personnel/lang/de.php +++ b/module/personnel/lang/de.php @@ -1,7 +1,7 @@ personnel->common = 'Program Personnel'; $lang->personnel->accessible = 'Acess List'; -$lang->personnel->putInto = 'Input Resource'; +$lang->personnel->invest = 'Input Resource'; $lang->personnel->department = 'Department'; $lang->personnel->realName = 'Name'; $lang->personnel->userName = 'Account'; @@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug'; $lang->personnel->createStories = 'Story'; $lang->personnel->risk = 'Risk'; $lang->personnel->issue = 'Issue'; -$lang->personnel->putInto = 'Input'; +$lang->personnel->invest = 'Input'; $lang->personnel->left = 'Remained'; $lang->personnel->created = 'Created'; $lang->personnel->finished = 'Finished'; @@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon; $lang->personnel->whitelist = 'Whitelist'; $lang->personnel->addWhitelist = 'Add Whitelist'; -$lang->personnel->unbindWhielist = 'Remove Whitelist'; +$lang->personnel->unbindWhitelist = 'Remove Whitelist'; $lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?'; $lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.'; diff --git a/module/personnel/lang/en.php b/module/personnel/lang/en.php index ab1aa7622b..3390cdb972 100644 --- a/module/personnel/lang/en.php +++ b/module/personnel/lang/en.php @@ -1,7 +1,7 @@ personnel->common = 'Program Personnel'; $lang->personnel->accessible = 'Acess List'; -$lang->personnel->putInto = 'Input Resource'; +$lang->personnel->invest = 'Input Resource'; $lang->personnel->department = 'Department'; $lang->personnel->realName = 'Name'; $lang->personnel->userName = 'Account'; @@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug'; $lang->personnel->createStories = 'Story'; $lang->personnel->risk = 'Risk'; $lang->personnel->issue = 'Issue'; -$lang->personnel->putInto = 'Input'; +$lang->personnel->invest = 'Input'; $lang->personnel->left = 'Remained'; $lang->personnel->created = 'Created'; $lang->personnel->finished = 'Finished'; @@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon; $lang->personnel->whitelist = 'Whitelist'; $lang->personnel->addWhitelist = 'Add Whitelist'; -$lang->personnel->unbindWhielist = 'Remove Whitelist'; +$lang->personnel->unbindWhitelist = 'Remove Whitelist'; $lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?'; $lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.'; diff --git a/module/personnel/lang/fr.php b/module/personnel/lang/fr.php index ab1aa7622b..3390cdb972 100644 --- a/module/personnel/lang/fr.php +++ b/module/personnel/lang/fr.php @@ -1,7 +1,7 @@ personnel->common = 'Program Personnel'; $lang->personnel->accessible = 'Acess List'; -$lang->personnel->putInto = 'Input Resource'; +$lang->personnel->invest = 'Input Resource'; $lang->personnel->department = 'Department'; $lang->personnel->realName = 'Name'; $lang->personnel->userName = 'Account'; @@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug'; $lang->personnel->createStories = 'Story'; $lang->personnel->risk = 'Risk'; $lang->personnel->issue = 'Issue'; -$lang->personnel->putInto = 'Input'; +$lang->personnel->invest = 'Input'; $lang->personnel->left = 'Remained'; $lang->personnel->created = 'Created'; $lang->personnel->finished = 'Finished'; @@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon; $lang->personnel->whitelist = 'Whitelist'; $lang->personnel->addWhitelist = 'Add Whitelist'; -$lang->personnel->unbindWhielist = 'Remove Whitelist'; +$lang->personnel->unbindWhitelist = 'Remove Whitelist'; $lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?'; $lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.'; diff --git a/module/personnel/lang/vi.php b/module/personnel/lang/vi.php index ab1aa7622b..3390cdb972 100644 --- a/module/personnel/lang/vi.php +++ b/module/personnel/lang/vi.php @@ -1,7 +1,7 @@ personnel->common = 'Program Personnel'; $lang->personnel->accessible = 'Acess List'; -$lang->personnel->putInto = 'Input Resource'; +$lang->personnel->invest = 'Input Resource'; $lang->personnel->department = 'Department'; $lang->personnel->realName = 'Name'; $lang->personnel->userName = 'Account'; @@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug'; $lang->personnel->createStories = 'Story'; $lang->personnel->risk = 'Risk'; $lang->personnel->issue = 'Issue'; -$lang->personnel->putInto = 'Input'; +$lang->personnel->invest = 'Input'; $lang->personnel->left = 'Remained'; $lang->personnel->created = 'Created'; $lang->personnel->finished = 'Finished'; @@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon; $lang->personnel->whitelist = 'Whitelist'; $lang->personnel->addWhitelist = 'Add Whitelist'; -$lang->personnel->unbindWhielist = 'Remove Whitelist'; +$lang->personnel->unbindWhitelist = 'Remove Whitelist'; $lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?'; $lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.'; diff --git a/module/personnel/lang/zh-cn.php b/module/personnel/lang/zh-cn.php index 43e8b660fe..993b2b48b8 100644 --- a/module/personnel/lang/zh-cn.php +++ b/module/personnel/lang/zh-cn.php @@ -1,7 +1,7 @@ personnel->common = '项目集人员'; $lang->personnel->accessible = '可访问人员列表'; -$lang->personnel->putInto = '投入人员列表'; +$lang->personnel->invest = '投入人员列表'; $lang->personnel->department = '部门'; $lang->personnel->realName = '真实姓名'; $lang->personnel->userName = '用户名'; @@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug'; $lang->personnel->createStories = '创建需求数'; $lang->personnel->risk = '风险'; $lang->personnel->issue = '问题'; -$lang->personnel->putInto = '已投入'; +$lang->personnel->invest = '已投入'; $lang->personnel->left = '剩余'; $lang->personnel->created = '创建'; $lang->personnel->finished = '完成'; @@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon; $lang->personnel->whitelist = '白名单列表'; $lang->personnel->addWhitelist = '添加白名单'; -$lang->personnel->unbindWhielist = '删除白名单'; +$lang->personnel->unbindWhitelist = '删除白名单'; $lang->personnel->confirmDelete = '确认将该用户移除白名单?'; $lang->personnel->openedPGMTip = '该项目集是公开状态,有项目集视图权限的人员即可访问。'; diff --git a/module/personnel/lang/zh-tw.php b/module/personnel/lang/zh-tw.php index 3c39ea8872..1d602c5a00 100644 --- a/module/personnel/lang/zh-tw.php +++ b/module/personnel/lang/zh-tw.php @@ -1,7 +1,7 @@ personnel->common = '項目集人員'; $lang->personnel->accessible = '可訪問人員列表'; -$lang->personnel->putInto = '投入人員列表'; +$lang->personnel->invest = '投入人員列表'; $lang->personnel->department = '部門'; $lang->personnel->realName = '真實姓名'; $lang->personnel->userName = '用戶名'; @@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug'; $lang->personnel->createStories = '創建需求數'; $lang->personnel->risk = '風險'; $lang->personnel->issue = '問題'; -$lang->personnel->putInto = '已投入'; +$lang->personnel->invest = '已投入'; $lang->personnel->left = '剩餘'; $lang->personnel->created = '創建'; $lang->personnel->finished = '完成'; @@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon; $lang->personnel->whitelist = '白名單列表'; $lang->personnel->addWhitelist = '添加白名單'; -$lang->personnel->unbindWhielist = '刪除白名單'; +$lang->personnel->unbindWhitelist = '刪除白名單'; $lang->personnel->confirmDelete = '確認將該用戶移除白名單?'; $lang->personnel->openedPGMTip = '該項目集是公開狀態,有項目集視圖權限的人員即可訪問。'; diff --git a/module/personnel/model.php b/module/personnel/model.php index d1a0a97853..dbec937d9b 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -125,22 +125,22 @@ class personnelModel extends model ->fetchAll('id'); /* Initialization personnel risks. */ - $putInto = array(); + $invest = array(); foreach($accounts as $account => $project) { - $putInto[$account]['createdRisk'] = 0; - $putInto[$account]['resolvedRisk'] = 0; - $putInto[$account]['pendingRisk'] = 0; + $invest[$account]['createdRisk'] = 0; + $invest[$account]['resolvedRisk'] = 0; + $invest[$account]['pendingRisk'] = 0; } foreach($risks as $risk) { - if($risk->createdBy && isset($putInto[$risk->createdBy])) $putInto[$risk->createdBy]['createdRisk'] += 1; - if($risk->resolvedBy && isset($putInto[$risk->resolvedBy])) $putInto[$risk->resolvedBy]['resolvedRisk'] += 1; - if($risk->assignedTo && $risk->status == 'active' && isset($putInto[$risk->assignedTo])) $putInto[$risk->assignedTo]['pendingRisk'] += 1; + if($risk->createdBy && isset($invest[$risk->createdBy])) $invest[$risk->createdBy]['createdRisk'] += 1; + if($risk->resolvedBy && isset($invest[$risk->resolvedBy])) $invest[$risk->resolvedBy]['resolvedRisk'] += 1; + if($risk->assignedTo && $risk->status == 'active' && isset($invest[$risk->assignedTo])) $invest[$risk->assignedTo]['pendingRisk'] += 1; } - return $putInto; + return $invest; } /** @@ -159,22 +159,22 @@ class personnelModel extends model ->fetchAll('id'); /* Initialization personnel issues. */ - $putInto = array(); + $invest = array(); foreach($accounts as $account => $project) { - $putInto[$account]['createdIssue'] = 0; - $putInto[$account]['resolvedIssue'] = 0; - $putInto[$account]['pendingIssue'] = 0; + $invest[$account]['createdIssue'] = 0; + $invest[$account]['resolvedIssue'] = 0; + $invest[$account]['pendingIssue'] = 0; } foreach($issues as $issue) { - if($issue->createdBy && isset($putInto[$issue->createdBy])) $putInto[$issue->createdBy]['createdIssue'] += 1; - if($issue->resolvedBy && isset($putInto[$issue->resolvedBy])) $putInto[$issue->resolvedBy]['resolvedIssue'] += 1; - if($issue->assignedTo && in_array($issue->status, array('unconfirmed', 'confirmed', 'active')) && isset($putInto[$issue->assignedTo])) $putInto[$issue->assignedTo]['pendingIssue'] += 1; + if($issue->createdBy && isset($invest[$issue->createdBy])) $invest[$issue->createdBy]['createdIssue'] += 1; + if($issue->resolvedBy && isset($invest[$issue->resolvedBy])) $invest[$issue->resolvedBy]['resolvedIssue'] += 1; + if($issue->assignedTo && in_array($issue->status, array('unconfirmed', 'confirmed', 'active')) && isset($invest[$issue->assignedTo])) $invest[$issue->assignedTo]['pendingIssue'] += 1; } - return $putInto; + return $invest; } /** @@ -212,26 +212,26 @@ class personnelModel extends model ->fetchPairs('openedBy'); /* Initialize bugs and requirements related to personnel. */ - $putInto = array(); + $invest = array(); foreach($accounts as $account => $project) { - $putInto[$account]['createdBug'] = 0; - $putInto[$account]['resolvedBug'] = 0; - $putInto[$account]['pendingBug'] = 0; - $putInto[$account]['UR'] = 0; - $putInto[$account]['SR'] = 0; + $invest[$account]['createdBug'] = 0; + $invest[$account]['resolvedBug'] = 0; + $invest[$account]['pendingBug'] = 0; + $invest[$account]['UR'] = 0; + $invest[$account]['SR'] = 0; } - foreach($requirement as $account => $number) $putInto[$account]['UR'] = $number; - foreach($story as $account => $number) $putInto[$account]['SR'] = $number; + foreach($requirement as $account => $number) $invest[$account]['UR'] = $number; + foreach($story as $account => $number) $invest[$account]['SR'] = $number; foreach($bugs as $bug) { - if($bug->openedBy && isset($putInto[$bug->openedBy])) $putInto[$bug->openedBy]['createdBug'] += 1; - if($bug->resolvedBy && isset($putInto[$bug->resolvedBy])) $putInto[$bug->resolvedBy]['resolvedBug'] += 1; - if($bug->assignedTo && $bug->status == 'active' && isset($putInto[$bug->assignedTo])) $putInto[$bug->assignedTo]['pendingBug'] += 1; + if($bug->openedBy && isset($invest[$bug->openedBy])) $invest[$bug->openedBy]['createdBug'] += 1; + if($bug->resolvedBy && isset($invest[$bug->resolvedBy])) $invest[$bug->resolvedBy]['resolvedBug'] += 1; + if($bug->assignedTo && $bug->status == 'active' && isset($invest[$bug->assignedTo])) $invest[$bug->assignedTo]['pendingBug'] += 1; } - return $putInto; + return $invest; } /** @@ -288,35 +288,35 @@ class personnelModel extends model ->fetchAll('id'); /* Initialize personnel related tasks. */ - $putInto = array(); + $invest = array(); foreach($accounts as $account => $project) { - $putInto[$account]['createdTask'] = 0; - $putInto[$account]['finishedTask'] = 0; - $putInto[$account]['pendingTask'] = 0; - $putInto[$account]['consumedTask'] = 0; - $putInto[$account]['leftTask'] = 0; + $invest[$account]['createdTask'] = 0; + $invest[$account]['finishedTask'] = 0; + $invest[$account]['pendingTask'] = 0; + $invest[$account]['consumedTask'] = 0; + $invest[$account]['leftTask'] = 0; } /* Number of tasks per person. */ $userTasks = array(); foreach($tasks as $task) { - if($task->openedBy && isset($putInto[$task->openedBy])) + if($task->openedBy && isset($invest[$task->openedBy])) { - $putInto[$task->openedBy]['createdTask'] += 1; + $invest[$task->openedBy]['createdTask'] += 1; $userTasks[$task->openedBy][$task->id] = $task->id; } - if($task->finishedBy && isset($putInto[$task->finishedBy])) + if($task->finishedBy && isset($invest[$task->finishedBy])) { - $putInto[$task->finishedBy]['finishedTask'] += 1; + $invest[$task->finishedBy]['finishedTask'] += 1; $userTasks[$task->finishedBy][$task->id] = $task->id; } - if($task->assignedTo && $task->status == 'wait' && isset($putInto[$task->assignedTo])) + if($task->assignedTo && $task->status == 'wait' && isset($invest[$task->assignedTo])) { - $putInto[$task->assignedTo]['pendingTask'] += 1; + $invest[$task->assignedTo]['pendingTask'] += 1; $userTasks[$task->assignedTo][$task->id] = $task->id; } } @@ -334,11 +334,11 @@ class personnelModel extends model foreach($userHours as $account => $hours) { - $putInto[$account]['leftTask'] = $hours->left; - $putInto[$account]['consumedTask'] = $hours->consumed; + $invest[$account]['leftTask'] = $hours->left; + $invest[$account]['consumedTask'] = $hours->consumed; } - return $putInto; + return $invest; } /** diff --git a/module/personnel/view/putinto.html.php b/module/personnel/view/putinto.html.php index 82e0f3152e..b4f0150103 100644 --- a/module/personnel/view/putinto.html.php +++ b/module/personnel/view/putinto.html.php @@ -1,6 +1,6 @@ - personnel->putInto;?> + personnel->invest;?> personnel->left;?> personnel->created;?> personnel->finished;?> diff --git a/module/personnel/view/whitelist.html.php b/module/personnel/view/whitelist.html.php index 5680d77c7c..36ca0974ee 100644 --- a/module/personnel/view/whitelist.html.php +++ b/module/personnel/view/whitelist.html.php @@ -58,8 +58,8 @@ email;?> createLink($module, 'unbindWhielist', "id=$user->id&confirm=no"), '', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openApp"); + $deleteClass = common::hasPriv($module, 'unbindWhitelist') ? 'btn' : 'btn disabled'; + echo html::a($this->createLink($module, 'unbindWhitelist', "id=$user->id&confirm=no"), '', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openApp"); ?> diff --git a/module/product/control.php b/module/product/control.php index a7c0318fb4..53c247e325 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1136,9 +1136,9 @@ class product 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"); } /** diff --git a/module/product/lang/de.php b/module/product/lang/de.php index dca39a99b2..e70e880ae3 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -92,7 +92,7 @@ $lang->product->RD = 'Release Manager'; $lang->product->acl = 'Zugriffskontrolle'; $lang->product->whitelist = 'Whitelist'; $lang->product->addWhitelist = 'Add Whitelist'; -$lang->product->unbindWhielist = 'Remove Whitelist'; +$lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->branch = '%s'; $lang->product->qa = 'QA'; $lang->product->release = 'Release'; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index a0606c730d..71f0c7f36b 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -92,7 +92,7 @@ $lang->product->RD = 'Release Manager'; $lang->product->acl = 'Access Control'; $lang->product->whitelist = 'Whitelist'; $lang->product->addWhitelist = 'Add Whitelist'; -$lang->product->unbindWhielist = 'Remove Whitelist'; +$lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->branch = '%s'; $lang->product->qa = 'Test'; $lang->product->release = 'Release'; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index e8eadd80d6..ca43561fdc 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -92,7 +92,7 @@ $lang->product->RD = 'Release Manager'; $lang->product->acl = "Contrôle accès"; $lang->product->whitelist = 'Liste Blanche'; $lang->product->addWhitelist = 'Add Whitelist'; -$lang->product->unbindWhielist = 'Remove Whitelist'; +$lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->branch = '%s'; $lang->product->qa = 'QA'; $lang->product->release = 'Release'; diff --git a/module/product/lang/vi.php b/module/product/lang/vi.php index fb5686e99d..610d5de2c2 100644 --- a/module/product/lang/vi.php +++ b/module/product/lang/vi.php @@ -92,7 +92,7 @@ $lang->product->RD = 'Quản lý phát hành'; $lang->product->acl = 'Quyền truy cập'; $lang->product->whitelist = 'Danh sách trắng'; $lang->product->addWhitelist = 'Add Whitelist'; -$lang->product->unbindWhielist = 'Remove Whitelist'; +$lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->branch = '%s'; $lang->product->qa = 'QA'; $lang->product->release = 'Phát hành'; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index b23632362e..1fa12f928c 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -92,7 +92,7 @@ $lang->product->RD = '发布负责人'; $lang->product->acl = '访问控制'; $lang->product->whitelist = '白名单'; $lang->product->addWhitelist = '添加白名单'; -$lang->product->unbindWhielist = '删除白名单'; +$lang->product->unbindWhitelist = '删除白名单'; $lang->product->branch = '所属%s'; $lang->product->qa = '测试'; $lang->product->release = '发布'; diff --git a/module/product/lang/zh-tw.php b/module/product/lang/zh-tw.php index dd08ab4e79..883b58cbae 100644 --- a/module/product/lang/zh-tw.php +++ b/module/product/lang/zh-tw.php @@ -88,7 +88,7 @@ $lang->product->RD = '發佈負責人'; $lang->product->acl = '訪問控制'; $lang->product->whitelist = '白名單'; $lang->product->addWhitelist = '添加白名單'; -$lang->product->unbindWhielist = '刪除白名單'; +$lang->product->unbindWhitelist = '刪除白名單'; $lang->product->branch = '所屬%s'; $lang->product->qa = '測試'; $lang->product->release = '發佈'; diff --git a/module/program/lang/zh-tw.php b/module/program/lang/zh-tw.php index f90f5f42d0..59bf585353 100644 --- a/module/program/lang/zh-tw.php +++ b/module/program/lang/zh-tw.php @@ -31,7 +31,7 @@ $lang->program->PRJUpdateOrder = '排序'; $lang->program->PRJSort = '項目排序'; $lang->program->PRJWhitelist = '項目白名單'; $lang->program->PRJAddWhitelist = '項目添加白名單'; -$lang->program->unbindWhielist = '項目刪除白名單'; +$lang->program->unbindWhitelist = '項目刪除白名單'; $lang->program->PRJManageProducts = '關聯產品'; $lang->program->view = '項目集詳情'; $lang->program->copyTitle = '請選擇要複製的項目'; diff --git a/module/project/control.php b/module/project/control.php index 7b464d8acf..19fbe7e744 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1189,9 +1189,9 @@ class project 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"); } /** diff --git a/module/project/lang/de.php b/module/project/lang/de.php index 8c2a03b0f3..439ff81b84 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; $lang->project->whitelist = 'Project Whitelist'; $lang->project->addWhitelist = 'Project Add Whitelist'; -$lang->project->unbindWhielist = 'Project Remove Whitelist'; +$lang->project->unbindWhitelist = 'Project Remove Whitelist'; $lang->project->manageProducts = 'Manage Products'; $lang->project->copyTitle = 'Please select an project to copy'; $lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.'; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index bbb20ab9db..f75c4ca9ee 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; $lang->project->whitelist = 'Project Whitelist'; $lang->project->addWhitelist = 'Project Add Whitelist'; -$lang->project->unbindWhielist = 'Project Remove Whitelist'; +$lang->project->unbindWhitelist = 'Project Remove Whitelist'; $lang->project->manageProducts = 'Manage Products'; $lang->project->copyTitle = 'Please select an project to copy'; $lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.'; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index cec11e6bf4..62b00a54fa 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; $lang->project->whitelist = 'Project Whitelist'; $lang->project->addWhitelist = 'Project Add Whitelist'; -$lang->project->unbindWhielist = 'Project Remove Whitelist'; +$lang->project->unbindWhitelist = 'Project Remove Whitelist'; $lang->project->manageProducts = 'Manage Products'; $lang->project->copyTitle = 'Please select an project to copy'; $lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.'; diff --git a/module/project/lang/vi.php b/module/project/lang/vi.php index a4358e87e6..ced76f81f8 100644 --- a/module/project/lang/vi.php +++ b/module/project/lang/vi.php @@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; $lang->project->whitelist = 'Project Whitelist'; $lang->project->addWhitelist = 'Project Add Whitelist'; -$lang->project->unbindWhielist = 'Project Remove Whitelist'; +$lang->project->unbindWhitelist = 'Project Remove Whitelist'; $lang->project->manageProducts = 'Manage Products'; $lang->project->copyTitle = 'Please select an project to copy'; $lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 745340a379..8b4377dfee 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -33,7 +33,7 @@ $lang->project->updateOrder = '排序'; $lang->project->sort = '项目排序'; $lang->project->whitelist = '项目白名单'; $lang->project->addWhitelist = '项目添加白名单'; -$lang->project->unbindWhielist = '项目删除白名单'; +$lang->project->unbindWhitelist = '项目删除白名单'; $lang->project->manageProducts = '关联产品'; $lang->project->copyTitle = '请选择要复制的项目'; $lang->project->errorSameProducts = '项目不能关联多个相同的产品。'; diff --git a/module/project/lang/zh-tw.php b/module/project/lang/zh-tw.php index 36b135ab1d..d989579b09 100644 --- a/module/project/lang/zh-tw.php +++ b/module/project/lang/zh-tw.php @@ -31,7 +31,7 @@ $lang->project->PRJUpdateOrder = '排序'; $lang->project->PRJSort = '項目排序'; $lang->project->PRJWhitelist = '項目白名單'; $lang->project->PRJAddWhitelist = '項目添加白名單'; -$lang->project->unbindWhielist = '項目刪除白名單'; +$lang->project->unbindWhitelist = '項目刪除白名單'; $lang->project->PRJManageProducts = '關聯產品'; $lang->project->view = '項目集詳情'; $lang->project->copyTitle = '請選擇要複製的項目'; From b6aed860942d552be5d4ba4350711c024d17510a Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 12 Mar 2021 10:59:14 +0800 Subject: [PATCH 21/33] * Adjust common language item. --- module/common/lang/zh-cn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index c02cf126db..eca049449f 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -381,9 +381,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(); From 51944f67f5dc292a26e06fa23f851b0933666d15 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 12 Mar 2021 11:10:15 +0800 Subject: [PATCH 22/33] * Code for personal. --- module/personnel/control.php | 2 +- module/personnel/view/{putinto.html.php => invest.html.php} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename module/personnel/view/{putinto.html.php => invest.html.php} (100%) diff --git a/module/personnel/control.php b/module/personnel/control.php index e99a89f94c..ed2d773106 100644 --- a/module/personnel/control.php +++ b/module/personnel/control.php @@ -149,7 +149,7 @@ class personnel extends control public function addWhitelist($objectID = 0, $deptID = 0, $objectType = 'program', $module = 'personnel', $programID = 0, $from = '') { if($module == 'personnel') $this->setProgramNavMenu($objectID); - $this->app->loadLang('project'); + $this->app->loadLang('execution'); if($_POST) { diff --git a/module/personnel/view/putinto.html.php b/module/personnel/view/invest.html.php similarity index 100% rename from module/personnel/view/putinto.html.php rename to module/personnel/view/invest.html.php From 7d1e3774542994a4f068aef6c325ea5fec9834ab Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 12 Mar 2021 11:23:55 +0800 Subject: [PATCH 23/33] * Rename function. --- module/personnel/control.php | 18 +++++------ module/personnel/model.php | 44 +++++++++++++-------------- module/personnel/view/invest.html.php | 18 +++++------ 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/module/personnel/control.php b/module/personnel/control.php index ed2d773106..6a97c9a925 100644 --- a/module/personnel/control.php +++ b/module/personnel/control.php @@ -26,7 +26,7 @@ class personnel extends control */ public function accessible($programID = 0, $deptID = 0, $browseType='browse', $param = 0, $recTotal = 0, $recPerPage = 15, $pageID = 1) { - $this->setProgramNavMenu($programID); + $this->setProgramMenu($programID); $this->app->loadLang('user'); $program = $this->loadModel('program')->getByID($programID); @@ -72,11 +72,11 @@ class personnel extends control */ public function invest($programID = 0) { - $this->setProgramNavMenu($programID); + $this->setProgramMenu($programID); - $this->view->title = $this->lang->personnel->invest; - $this->view->position[] = $this->lang->personnel->invest; - $this->view->inputPersonnel = $this->personnel->getInputPersonnel($programID); + $this->view->title = $this->lang->personnel->invest; + $this->view->position[] = $this->lang->personnel->invest; + $this->view->invest = $this->personnel->getInvest($programID); $this->display(); } @@ -98,7 +98,7 @@ class personnel extends control */ public function whitelist($objectID = 0, $module = 'personnel', $objectType = 'program', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $programID = 0, $from = '') { - if($module == 'personnel') $this->setProgramNavMenu($objectID); + if($module == 'personnel') $this->setProgramMenu($objectID); if($module == 'product') { @@ -148,7 +148,7 @@ class personnel extends control */ public function addWhitelist($objectID = 0, $deptID = 0, $objectType = 'program', $module = 'personnel', $programID = 0, $from = '') { - if($module == 'personnel') $this->setProgramNavMenu($objectID); + if($module == 'personnel') $this->setProgramMenu($objectID); $this->app->loadLang('execution'); if($_POST) @@ -215,13 +215,13 @@ class personnel extends control } /* - * Setting up the program's navigation menu. + * Setting up the program menu. * * @param int $programID * @access public * @return void */ - public function setProgramNavMenu($programID = 0) + public function setProgramMenu($programID = 0) { $this->loadModel('program'); $this->lang->navGroup->program = 'program'; diff --git a/module/personnel/model.php b/module/personnel/model.php index dbec937d9b..1a7655f439 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -12,7 +12,7 @@ class personnelModel extends model { /** - * Access to program set input staff. + * Access to program set invest staff. * * @param int $programID * @param int $deptID @@ -56,13 +56,13 @@ class personnelModel extends model } /** - * Access to program set input staff. + * Get invest person list. * - * @param int $programID + * @param int $programID * @access public * @return array */ - public function getInputPersonnel($programID = 0) + public function getInvest($programID = 0) { $personnelList = array(); @@ -79,14 +79,14 @@ class personnelModel extends model if(empty($accountPairs)) return $personnelList; $executionPairs = $this->getInvolvedExecutions($projects); - $taskInput = $this->getProjectTaskInput($projects, $accountPairs); - $bugAndStoryInput = $this->getBugAndStoryInput($accountPairs, $programID); + $taskInvest = $this->getProjectTaskInvest($projects, $accountPairs); + $bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID); if(isset($this->config->maxVersion)) { - $issueInput = $this->getIssueInput($accountPairs, $projects); - $riskInput = $this->getRiskInput($accountPairs, $projects); + $issueInvest = $this->getIssueInvest($accountPairs, $projects); + $riskInvest = $this->getRiskInvest($accountPairs, $projects); } - $userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account'); + $userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account'); foreach($userPairs as $user) $user->role = zget($this->lang->user->roleList, $user->role, $user->role); foreach($accountPairs as $account => $projects) @@ -97,12 +97,12 @@ class personnelModel extends model $personnelList[$account]['projects'] = $projects; $personnelList[$account]['executions'] = zget($executionPairs, $account, 0); - $personnelList[$account] += $taskInput[$account]; - $personnelList[$account] += $bugAndStoryInput[$account]; + $personnelList[$account] += $taskInvest[$account]; + $personnelList[$account] += $bugAndStoryInvest[$account]; if(isset($this->config->maxVersion)) { - $personnelList[$account] += $issueInput[$account]; - $personnelList[$account] += $riskInput[$account]; + $personnelList[$account] += $issueInvest[$account]; + $personnelList[$account] += $riskInvest[$account]; } } @@ -110,14 +110,14 @@ class personnelModel extends model } /** - * Get user project risk input. + * Get user project risk invest. * * @param array $accounts * @param object $projects * @access public * @return array */ - public function getRiskInput($accounts, $projects) + public function getRiskInvest($accounts, $projects) { $risks = $this->dao->select('id,createdBy,resolvedBy,status,assignedTo')->from(TABLE_RISK) ->where('project')->in(array_keys($projects)) @@ -144,14 +144,14 @@ class personnelModel extends model } /** - * Get user project issue input. + * Get user project issue invest. * * @param array $accounts * @param object $projects * @access public * @return array */ - public function getIssueInput($accounts, $projects) + public function getIssueInvest($accounts, $projects) { $issues = $this->dao->select('id,createdBy,resolvedBy,status,assignedTo')->from(TABLE_ISSUE) ->where('project')->in(array_keys($projects)) @@ -178,14 +178,14 @@ class personnelModel extends model } /** - * Get user bug and story input. + * Get user bug and story invest. * * @param array $accounts * @param int $programID * @access public * @return array */ - public function getBugAndStoryInput($accounts, $programID) + public function getBugAndStoryInvest($accounts, $programID) { $productPairs = $this->loadModel('product')->getPairs('', $programID); $productKeys = array_keys($productPairs); @@ -273,14 +273,14 @@ class personnelModel extends model } /** - * Get project task inputs. + * Get project task invest. * * @param object $projects * @param array $accounts * @access public * @return array */ - public function getProjectTaskInput($projects, $accounts) + public function getProjectTaskInvest($projects, $accounts) { $tasks = $this->dao->select('id,status,openedBy,finishedBy,assignedTo,project')->from(TABLE_TASK) ->where('project')->in(array_keys($projects)) @@ -409,7 +409,7 @@ class personnelModel extends model } /** - * Access to program set input staff. + * Access to program set invest staff. * * @param int $objectID * @param string $objectType program|project|product|sprint diff --git a/module/personnel/view/invest.html.php b/module/personnel/view/invest.html.php index b4f0150103..1ec562a3f0 100644 --- a/module/personnel/view/invest.html.php +++ b/module/personnel/view/invest.html.php @@ -22,16 +22,16 @@ personnel->name;?> - personnel->role;?> - personnel->projects;?> - personnel->executions;?> - personnel->workingHours;?> - personnel->task;?> - personnel->bug;?> + personnel->role;?> + personnel->projects;?> + personnel->executions;?> + personnel->workingHours;?> + personnel->task;?> + personnel->bug;?> personnel->createStories;?> config->maxVersion)): ?> - personnel->issue;?> - personnel->risk;?> + personnel->issue;?> + personnel->risk;?> @@ -56,7 +56,7 @@ - + '> '> From e86f744e86b6390a5ef282d6c02d8d9d4e001d2f Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Fri, 12 Mar 2021 13:28:43 +0800 Subject: [PATCH 24/33] * Adjust the code. --- module/testcase/model.php | 50 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index 7556806d5e..a24be4ee0f 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -659,6 +659,40 @@ class testcaseModel extends model $titleChanged = ($case->title != $oldCase->title); if($isLibCase and $titleChanged) $this->dao->update(TABLE_CASE)->set('`title`')->eq($case->title)->where('`fromCaseID`')->eq($caseID)->exec(); + /* The case is linked the project. */ + if($oldCase->project != 0) + { + $productChanged = ($oldCase->product != $case->product); + $storyChanged = ($oldCase->story != $case->story); + + if($productChanged) + { + $this->dao->update(TABLE_PROJECTCASE) + ->set('product')->eq($case->product) + ->set('version')->eq($case->version) + ->where('project')->eq($oldCase->project) + ->andWhere('`case`')->eq($oldCase->id) + ->exec(); + } + + /* If the related story is changed and the new related story isn't linked the project, unlink the case. */ + if($storyChanged) + { + $projectStory = $this->dao->select('*')->from(TABLE_PROJECTSTORY) + ->where('project')->eq($oldCase->project) + ->andWhere('story')->eq($case->story) + ->fetchAll(); + if(!$projectStory) + { + $this->dao->delete()->from(TABLE_PROJECTCASE) + ->where('project')->eq($oldCase->project) + ->andWhere('`case`')->eq($oldCase->id) + ->exec(); + } + + } + } + if($stepChanged) { $parentStepID = 0; @@ -1305,7 +1339,7 @@ class testcaseModel extends model { $case->fromCaseID = $case->id; $case->fromCaseVersion = $case->version; - $case->product = $productID; + $case->product = $productID; if(isset($data->module[$case->id])) $case->module = $data->module[$case->id]; if(isset($data->branch[$case->id])) $case->branch = $data->branch[$case->id]; unset($case->id); @@ -1325,6 +1359,20 @@ class testcaseModel extends model } } + /* If under the project module, the cases is imported need linking to the project. */ + if($this->lang->navGroup->testcase != 'qa') + { + $lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($this->session->PRJ)->orderBy('order_desc')->limit(1)->fetch('order'); + + $this->dao->insert(TABLE_PROJECTCASE) + ->set('project')->eq($case->project) + ->set('product')->eq($case->product) + ->set('case')->eq($caseID) + ->set('version')->eq($case->version) + ->set('order')->eq(++ $lastOrder) + ->exec(); + } + /* Fix bug #1518. */ $oldFiles = zget($libFiles, $libCaseID, array()); foreach($oldFiles as $fileID => $file) From 1241e1a7696632190981c3f93b809d399188fa5a Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 12 Mar 2021 13:29:40 +0800 Subject: [PATCH 25/33] * Fix code error. --- module/block/view/testtaskblock.html.php | 2 +- module/my/control.php | 4 ++-- module/user/model.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/block/view/testtaskblock.html.php b/module/block/view/testtaskblock.html.php index b4327a7afb..a4748ced96 100644 --- a/module/block/view/testtaskblock.html.php +++ b/module/block/view/testtaskblock.html.php @@ -23,7 +23,7 @@ testtask->name;?> - testtask->project . '/' . $lang->testtask->build;?> + testtask->execution . '/' . $lang->testtask->build;?> testtask->begin;?> testtask->end;?> diff --git a/module/my/control.php b/module/my/control.php index b8fc33baaf..4037593ae0 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -500,7 +500,7 @@ class my extends control /* Get PM id list. */ $accounts = array(); - $projects = $this->user->getProjects($this->app->user->account, 'project', $status, $pager); + $projects = $this->user->getExecutions($this->app->user->account, 'project', $status, 'id_desc', $pager); foreach($projects as $project) { if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM; @@ -540,7 +540,7 @@ class my extends control $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->execution; $this->view->position[] = $this->lang->my->execution; $this->view->tabID = 'project'; - $this->view->executions = $this->user->getProjects($this->app->user->account, 'execution', $type, $pager); + $this->view->executions = $this->user->getExecutions($this->app->user->account, 'execution', $type, $orderBy, $pager); $this->view->type = $type; $this->view->pager = $pager; $this->view->mode = 'execution'; diff --git a/module/user/model.php b/module/user/model.php index f81c58a4bc..a2fe00432c 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1023,7 +1023,7 @@ class userModel extends model * @access public * @return array */ - public function getExecutions($account, $type = 'execution', $status = 'all', $orderBy, $pager = null) + public function getExecutions($account, $type = 'execution', $status = 'all', $orderBy = 'id_desc', $pager = null) { if($type == 'execution') $type = 'sprint,stage'; $myProjectsList = $this->dao->select('t1. *,t2. *')->from(TABLE_TEAM)->alias('t1') From 9ff48bdb534d41955e1a43339598623ce78177d3 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 12 Mar 2021 14:14:56 +0800 Subject: [PATCH 26/33] * Adjust code. --- module/testcase/control.php | 2 +- module/testcase/lang/de.php | 7 +- module/testcase/lang/en.php | 7 +- module/testcase/lang/fr.php | 9 +- module/testcase/lang/vi.php | 7 +- module/testcase/lang/zh-cn.php | 3 + module/testcase/view/caseheader.html.php | 23 +++- module/testtask/control.php | 3 + module/testtask/view/browseunits.html.php | 139 ++++++++++++---------- 9 files changed, 120 insertions(+), 80 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index a6df85f4ee..5d9b7b7c35 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -206,7 +206,7 @@ class testcase extends control } } - $this->app->loadLang('project'); + $this->app->loadLang('execution'); $this->app->loadLang('task'); $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common; diff --git a/module/testcase/lang/de.php b/module/testcase/lang/de.php index 1eaa586057..e7a6bb0a49 100644 --- a/module/testcase/lang/de.php +++ b/module/testcase/lang/de.php @@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Ignore'; $lang->testcase->fromTesttask = 'From Test Request'; $lang->testcase->fromCaselib = 'From CaseLib'; $lang->testcase->deleted = 'Deleted'; +$lang->testcase->browseUnits = 'Unit Test'; + $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. $lang->testcase->stepID = 'ID'; @@ -219,7 +221,8 @@ $lang->testcase->action->reviewed = array('main' => '$date, überprüft von testcase->featureBar['browse']['all'] = $lang->testcase->allCases; $lang->testcase->featureBar['browse']['wait'] = 'Wartend'; $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm; -$lang->testcase->featureBar['browse']['group'] = ''; +$lang->testcase->featureBar['browse']['group'] = 'Group View'; $lang->testcase->featureBar['browse']['suite'] = 'Suite'; -$lang->testcase->featureBar['browse']['zerocase'] = ''; +$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story'; +$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test'; $lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse']; diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index f6654283ee..54f198aa3e 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Ignore'; $lang->testcase->fromTesttask = 'From Test Request'; $lang->testcase->fromCaselib = 'From Case Library'; $lang->testcase->deleted = 'Deleted'; +$lang->testcase->browseUnits = 'Unit Test'; + $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. $lang->testcase->stepID = 'ID'; @@ -219,7 +221,8 @@ $lang->testcase->action->reviewed = array('main' => '$date, recorded by $lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases; $lang->testcase->featureBar['browse']['wait'] = 'Waiting'; $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm; -$lang->testcase->featureBar['browse']['group'] = ''; +$lang->testcase->featureBar['browse']['group'] = 'Group View'; $lang->testcase->featureBar['browse']['suite'] = 'Suite'; -$lang->testcase->featureBar['browse']['zerocase'] = ''; +$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story'; +$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test'; $lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse']; diff --git a/module/testcase/lang/fr.php b/module/testcase/lang/fr.php index a6c57bd588..7a445fe8fa 100644 --- a/module/testcase/lang/fr.php +++ b/module/testcase/lang/fr.php @@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Ignorer'; $lang->testcase->fromTesttask = 'De Campagne'; $lang->testcase->fromCaselib = 'De Library'; $lang->testcase->deleted = 'Deleted'; +$lang->testcase->browseUnits = 'Unit Test'; + $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. $lang->testcase->stepID = 'ID'; @@ -219,7 +221,8 @@ $lang->testcase->action->reviewed = array('main' => '$date, enregistré par testcase->featureBar['browse']['all'] = $lang->testcase->allCases; $lang->testcase->featureBar['browse']['wait'] = 'En Attente'; $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm; -$lang->testcase->featureBar['browse']['group'] = ''; -$lang->testcase->featureBar['browse']['suite'] = 'Cahier Recette'; -$lang->testcase->featureBar['browse']['zerocase'] = ''; +$lang->testcase->featureBar['browse']['group'] = 'Group View'; +$lang->testcase->featureBar['browse']['suite'] = 'Suite'; +$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story'; +$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test'; $lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse']; diff --git a/module/testcase/lang/vi.php b/module/testcase/lang/vi.php index 418693d528..bc4c152648 100644 --- a/module/testcase/lang/vi.php +++ b/module/testcase/lang/vi.php @@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Bỏ qua'; $lang->testcase->fromTesttask = 'Từ Yêu cầu Test'; $lang->testcase->fromCaselib = 'Từ thư viện tình huống'; $lang->testcase->deleted = 'Đã xóa'; +$lang->testcase->browseUnits = 'Unit Test'; + $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. $lang->testcase->stepID = 'ID'; @@ -219,7 +221,8 @@ $lang->testcase->action->reviewed = array('main' => '$date, ghi nhận bởi testcase->featureBar['browse']['all'] = $lang->testcase->allCases; $lang->testcase->featureBar['browse']['wait'] = 'Đang đợi'; $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm; -$lang->testcase->featureBar['browse']['group'] = ''; +$lang->testcase->featureBar['browse']['group'] = 'Group View'; $lang->testcase->featureBar['browse']['suite'] = 'Suite'; -$lang->testcase->featureBar['browse']['zerocase'] = ''; +$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story'; +$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test'; $lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse']; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 0ce5bd5a56..4c376fabe4 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -74,6 +74,8 @@ $lang->testcase->ignore = '忽略'; $lang->testcase->fromTesttask = '来自测试单用例'; $lang->testcase->fromCaselib = '来自用例库用例'; $lang->testcase->deleted = '是否删除'; +$lang->testcase->browseUnits = '单元测试'; + $lang->case = $lang->testcase; // 用于DAO检查时使用。因为case是系统关键字,所以无法定义该模块为case,只能使用testcase,但表还是使用的case。 $lang->testcase->stepID = '编号'; @@ -222,4 +224,5 @@ $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConf $lang->testcase->featureBar['browse']['group'] = '分组查看'; $lang->testcase->featureBar['browse']['suite'] = '套件'; $lang->testcase->featureBar['browse']['zerocase'] = "零用例{$lang->SRCommon}"; +$lang->testcase->featureBar['browse']['browseunits'] = '单元测试'; $lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse']; diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index 48e4229f78..68008aabad 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -5,11 +5,18 @@
lang->tree->all; - if(!empty($moduleID)) + if($this->app->rawMethod == 'browseunits') { - $removeLink = $browseType == 'bymodule' ? $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")'; - echo html::a($removeLink, "", '', "class='text-muted'"); + echo $lang->testtask->unitTag[$browseType]; + } + else + { + echo !empty($moduleID) ? $moduleName : $this->lang->tree->all; + if(!empty($moduleID)) + { + $removeLink = $browseType == 'bymodule' ? $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")'; + echo html::a($removeLink, "", '', "class='text-muted'"); + } } ?>
@@ -19,6 +26,7 @@ $hasBrowsePriv = common::hasPriv('testcase', 'browse'); $hasGroupPriv = common::hasPriv('testcase', 'groupcase'); $hasZeroPriv = common::hasPriv('story', 'zerocase'); + $hasUnitPriv = common::hasPriv('testtask', 'browseunits'); ?> createLink('story', 'zeroCase', "productID=$productID&orderBy=id_desc&from={$this->lang->navGroup->testcase}"), "{$lang->story->zeroCase}", '', "class='btn btn-link' id='zerocaseTab'"); } + elseif($hasUnitPriv and $menuType == 'browseunits') + { + echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID"), "{$lang->testcase->browseUnits}", '', "class='btn btn-link' id='browseunitsTab'"); + } ?> " . $lang->testcase->create, '', "class='btn btn-primary'"); } ?> + app->rawMethod == 'browseunits' and common::canModify('product', $product)):?> + " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?> +