From dc659c6c1664b7574f623ea4533e54efbb3e4e2a Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 26 Apr 2021 13:03:27 +0800 Subject: [PATCH 01/24] * Fix bug #12194. --- module/user/control.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/module/user/control.php b/module/user/control.php index b01fafe60d..04aba479ba 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -765,12 +765,25 @@ class user extends control */ public function login($referer = '', $from = '') { + /* Check if you can operating on the folder. */ + $canModifyDIR = true; if($this->user->checkTmp() === false) + { + $canModifyDIR = false; + $floderPath = $this->app->tmpRoot; + } + elseif(!is_dir($this->app->dataRoot) or substr(base_convert(@fileperms($this->app->dataRoot),10,8),-4) != '0777') + { + $canModifyDIR = false; + $floderPath = $this->app->dataRoot; + } + + if(!$canModifyDIR) { echo ""; echo "
"; - echo "
不能创建临时目录,请确认目录{$this->app->tmpRoot}是否存在并有操作权限。
"; - echo "
Can't create tmp directory, make sure the directory {$this->app->tmpRoot} exists and has permission to operate.
"; + echo "
不能创建临时目录,请确认目录{$floderPath}是否存在并有操作权限。
"; + echo "
Can't create tmp directory, make sure the directory {$floderPath} exists and has permission to operate.
"; die("
"); } $this->setReferer($referer); From 8f71af3835517e1753ce10785378aceafe5f8f91 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 13:13:49 +0800 Subject: [PATCH 02/24] * Fix bug #12389. --- module/bug/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 40338b4cd7..d8ad8fa414 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -117,7 +117,7 @@ type != 'normal'):?> - product->branch, $lang->product->branchName[$product->name]);?> + product->branch, $lang->product->branchName[$product->type]);?> product&branch=$bug->branch", $branchName)) echo $branchName;?> From a8d33273e6de8945274c2ef4da9d6ec9da968704 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 26 Apr 2021 13:26:02 +0800 Subject: [PATCH 03/24] * Adjust menu in test task. --- module/testtask/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 3940fb2a0b..7483f41db2 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -100,7 +100,7 @@ class testtask extends control /* Set menu. */ $productID = $this->product->saveState($productID, $this->products); if($branch === '') $branch = (int)$this->cookie->preBranch; - $this->loadModel('qa')->setMenu($this->products, $productID, $branch); + $this->loadModel('qa')->setMenu($this->products, $productID, $branch, $type); /* Load pager. */ $this->app->loadClass('pager', $static = true); From 8f686722ccbc63445606813c613fbc8db4630787 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 26 Apr 2021 13:22:59 +0800 Subject: [PATCH 04/24] * Fix bug #12296. --- db/update15.0.rc3.sql | 4 ++++ db/zentao.sql | 1 + module/repo/model.php | 1 + module/repo/view/edit.html.php | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/db/update15.0.rc3.sql b/db/update15.0.rc3.sql index a178bfc08c..32c075db94 100644 --- a/db/update15.0.rc3.sql +++ b/db/update15.0.rc3.sql @@ -1,2 +1,6 @@ +<<<<<<< 8f71af3835517e1753ce10785378aceafe5f8f91 ALTER TABLE `zt_webhook` CHANGE `projects` `executions` text NOT NULL; ALTER TABLE `zt_webhook` CHANGE `executions` `executions` text NOT NULL; +======= +ALTER TABLE `zt_repo` ADD `extra` char(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `desc`; +>>>>>>> * Fix bug #12296. diff --git a/db/zentao.sql b/db/zentao.sql index 40ecb203ab..2972f01cdf 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -751,6 +751,7 @@ CREATE TABLE IF NOT EXISTS `zt_repo` ( `synced` tinyint(1) NOT NULL DEFAULT '0', `lastSync` datetime NOT NULL, `desc` text NOT NULL, + `extra` char(30) NOT NULL, `deleted` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/module/repo/model.php b/module/repo/model.php index 3ba22e6e32..fd22ec2338 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -237,6 +237,7 @@ class repoModel extends model $data = fixer::input('post') ->setIf($this->post->SCM == 'Gitlab', 'password', $this->post->gitlabToken) ->setIf($this->post->SCM == 'Gitlab', 'client', $this->post->gitlabHost) + ->setIf($this->post->SCM == 'Gitlab', 'extra', $this->post->gitlabProject) ->skipSpecial('path,client,account,password') ->setDefault('product', '') ->join('product', ',') diff --git a/module/repo/view/edit.html.php b/module/repo/view/edit.html.php index 823e7dfd13..296ed78293 100644 --- a/module/repo/view/edit.html.php +++ b/module/repo/view/edit.html.php @@ -48,7 +48,7 @@ repo->gitlabProject;?> - + extra, "class='form-control chosen'");?> repo->name; ?> From 4c749117a6e1eb8e27ed1e510a38ac0f500ca649 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 26 Apr 2021 13:29:13 +0800 Subject: [PATCH 05/24] * Fix bug. --- db/update15.0.rc3.sql | 4 +--- module/my/view/project.html.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/db/update15.0.rc3.sql b/db/update15.0.rc3.sql index 32c075db94..124a3ea4a3 100644 --- a/db/update15.0.rc3.sql +++ b/db/update15.0.rc3.sql @@ -1,6 +1,4 @@ -<<<<<<< 8f71af3835517e1753ce10785378aceafe5f8f91 ALTER TABLE `zt_webhook` CHANGE `projects` `executions` text NOT NULL; ALTER TABLE `zt_webhook` CHANGE `executions` `executions` text NOT NULL; -======= + ALTER TABLE `zt_repo` ADD `extra` char(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `desc`; ->>>>>>> * Fix bug #12296. diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 83b0a663c4..d8f51b872e 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -91,7 +91,7 @@
From 2ae329dae4acfbd1ef239a783dcc7db4da6313cc Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Mon, 26 Apr 2021 13:33:52 +0800 Subject: [PATCH 06/24] * Fix bug #12324. --- module/project/control.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/module/project/control.php b/module/project/control.php index f2e656dde3..330545a655 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -272,6 +272,30 @@ class project extends control $this->loadModel('action')->create('project', $projectID, 'opened'); + /* Link the plan stories. */ + if($_POST['plans']) + { + foreach($_POST['plans'] as $planID) + { + $planStories = $planProducts = array(); + $planStory = $this->loadModel('story')->getPlanStories($planID); + if(!empty($planStory)) + { + foreach($planStory as $id => $story) + { + if($story->status == 'draft') + { + unset($planStory[$id]); + continue; + } + $planProducts[$story->id] = $story->product; + } + $planStories = array_keys($planStory); + $this->execution->linkStory($projectID, $planStories, $planProducts); + } + } + } + if($this->app->openApp == 'program') { $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse'))); From c8b405be8883a7ec67218cf505053bd4054d4aec Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 26 Apr 2021 13:33:55 +0800 Subject: [PATCH 07/24] * Fix bug #12375. --- module/testcase/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index a973ec7b21..e73a87ea52 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -541,7 +541,7 @@ class testcaseModel extends model ->andWhere('t2.deleted')->eq(0) ->beginIF($auto != 'skip' and $auto != 'unit')->andWhere('t2.auto')->ne('unit')->fi() ->beginIF($auto == 'unit')->andWhere('t2.auto')->eq('unit')->fi() - ->orderBy($orderBy)->page($pager)->fetchAll(); + ->orderBy($orderBy)->page($pager)->fetchAll('id'); } /** From 35e91b8c3b42f5cd620c84f28a1d8073128b13ed Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 26 Apr 2021 13:36:51 +0800 Subject: [PATCH 08/24] * Fix bug #12338. --- module/my/view/project.html.php | 2 +- module/program/view/browsebylist.html.php | 2 +- module/project/control.php | 11 +++++------ module/project/model.php | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index d8f51b872e..0f43c5afb9 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -91,7 +91,7 @@
diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 5e91d301cc..2d7694fbf5 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -103,7 +103,7 @@
diff --git a/module/project/control.php b/module/project/control.php index 330545a655..dd8c4a05c6 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1465,13 +1465,12 @@ class project extends control /** * Manage products. * - * @param int $projectID - * @param int $programID + * @param int $projectID * @param string $from project|program|programproject * @access public * @return void */ - public function manageProducts($projectID, $programID = 0, $from = 'project') + public function manageProducts($projectID, $from = 'project') { $this->loadModel('product'); $this->loadModel('program'); @@ -1510,9 +1509,9 @@ class project extends control $this->project->setMenu($projectID); } - $allProducts = $this->program->getProductPairs($project->parent, 'assign', 'noclosed'); - $linkedProducts = $this->product->getProducts($project->id); - $linkedBranches = array(); + $allProducts = $this->program->getProductPairs($project->parent, 'assign', 'noclosed'); + $linkedProducts = $this->product->getProducts($project->id); + $linkedBranches = array(); /* If the story of the product which linked the project, you don't allow to remove the product. */ $unmodifiableProducts = array(); diff --git a/module/project/model.php b/module/project/model.php index 4024157563..a078124118 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1381,7 +1381,7 @@ class projectModel extends model echo "
"; echo ""; echo ""; From ab994d6f92ef27ace68b159695f9a834bfddd1fe Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 26 Apr 2021 13:50:07 +0800 Subject: [PATCH 09/24] * Fix bug#12372. --- module/testcase/view/view.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 246eb73ade..e87fc1e0e0 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -202,7 +202,8 @@ storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story", '', true), "#$case->story:$case->storyTitle", '', "class=$class data-width='80%'"); + $param = $this->app->openApp == 'project' ? "&version=0&projectID={$this->session->project}" : ''; + if(isset($case->storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story" . $param, '', true), "#$case->story:$case->storyTitle", '', "class=$class data-width='80%'"); if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion) { echo "({$lang->story->changed} "; From 0046b58c1d7711a780c797757cde8f24acdba507 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 26 Apr 2021 13:55:56 +0800 Subject: [PATCH 10/24] * Fix bug #12327. --- module/task/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index ddd5cbbcc1..762703d031 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -677,7 +677,7 @@ class task extends control /* Set menu. */ $execution = $this->execution->getById($task->execution); - $this->execution->setMenu($execution->id); + if($this->app->openApp == 'execution') $this->execution->setMenu($execution->id); $this->executeHooks($taskID); From 9b1438d40c90b908ebace5b44f51bf7a317c5121 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 14:03:58 +0800 Subject: [PATCH 11/24] * Fix bug #12392. --- module/execution/control.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/execution/control.php b/module/execution/control.php index 5382f57de5..ff9790639d 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2044,6 +2044,13 @@ class execution extends control if($unresolvedBugs->count) $tips .= sprintf($this->lang->execution->unresolvedBug, $unresolvedBugs->count); if($tips) $tips = $this->lang->execution->unfinishedExecution . $tips; + $type = $this->dao->select('type')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('type'); + if($type == 'stage') + { + if($tips) $tips = str_replace($this->lang->executionCommon, $this->lang->project->stage, $tips); + $this->lang->execution->confirmDelete = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->confirmDelete); + } + echo js::confirm($tips . sprintf($this->lang->execution->confirmDelete, $this->executions[$executionID]), $this->createLink('execution', 'delete', "executionID=$executionID&confirm=yes")); exit; } From ce762a919aab19e4734465f364d78276470ae5c4 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 14:17:54 +0800 Subject: [PATCH 12/24] * Fix bug #12394. --- module/execution/model.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index c2b818b864..98d21220cf 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -387,10 +387,10 @@ class executionModel extends model $this->app->loadLang('doc'); $lib = new stdclass(); $lib->execution = $executionID; - $lib->name = $this->lang->doclib->main['execution']; - $lib->type = 'execution'; - $lib->main = '1'; - $lib->acl = 'default'; + $lib->name = $type == 'stage' ? str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doclib->main['execution']) : $this->lang->doclib->main['execution']; + $lib->type = 'execution'; + $lib->main = '1'; + $lib->acl = 'default'; $this->dao->insert(TABLE_DOCLIB)->data($lib)->exec(); $whitelist = explode(',', $sprint->whitelist); From f00d94cf42f2ca62f2bf4592d3f2291bfa265cc6 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 26 Apr 2021 14:48:23 +0800 Subject: [PATCH 13/24] * Fix bug #12325. --- module/program/js/create.js | 11 +++++++++++ module/program/js/edit.js | 11 +++++++++++ module/project/control.php | 2 +- module/project/js/common.js | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/module/program/js/create.js b/module/program/js/create.js index 54607ac1d9..a23674ec40 100644 --- a/module/program/js/create.js +++ b/module/program/js/create.js @@ -25,6 +25,17 @@ $(function() $('#end').removeAttr('disabled'); } }); + + $('#end').change(function() + { + var beginDate = $('#begin').val(); + var endDate = $('#end').val(); + var begin = new Date(beginDate.replace(/-/g,"/")); + var end = new Date(endDate.replace(/-/g,"/")); + var time = end.getTime() - begin.getTime(); + var days = parseInt(time / (1000 * 60 * 60 * 24)) + 1; + if(days != $("input:radio[name='delta']:checked").val()) $("input:radio[name='delta']:checked").attr('checked',false); + }) }); function setCopyProject(copiedProgramID) diff --git a/module/program/js/edit.js b/module/program/js/edit.js index 1dcb3582f2..2949acf5fa 100644 --- a/module/program/js/edit.js +++ b/module/program/js/edit.js @@ -27,5 +27,16 @@ $(function() } }); + $('#end').change(function() + { + var beginDate = $('#begin').val(); + var endDate = $('#end').val(); + var begin = new Date(beginDate.replace(/-/g,"/")); + var end = new Date(endDate.replace(/-/g,"/")); + var time = end.getTime() - begin.getTime(); + var days = parseInt(time / (1000 * 60 * 60 * 24)) + 1; + if(days != $("input:radio[name='delta']:checked").val()) $("input:radio[name='delta']:checked").attr('checked',false); + }) + $('#isCat').change(); }); diff --git a/module/project/control.php b/module/project/control.php index dd8c4a05c6..72a554689a 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -273,7 +273,7 @@ class project extends control $this->loadModel('action')->create('project', $projectID, 'opened'); /* Link the plan stories. */ - if($_POST['plans']) + if(!empty($_POST['plans'])) { foreach($_POST['plans'] as $planID) { diff --git a/module/project/js/common.js b/module/project/js/common.js index 760170c28a..7e2ab51d43 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -75,6 +75,12 @@ function computeWorkDays(currentID) { beginDate = $('#begin').val(); endDate = $('#end').val(); + + var begin = new Date(beginDate.replace(/-/g,"/")); + var end = new Date(endDate.replace(/-/g,"/")); + var time = end.getTime() - begin.getTime(); + var days = parseInt(time / (1000 * 60 * 60 * 24)) + 1; + if(days != $("input:radio[name='delta']:checked").val()) $("input:radio[name='delta']:checked").attr('checked',false); } if(beginDate && endDate) From 8dce53e8520d978e1cecaebf172809f8796be86a Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 14:52:16 +0800 Subject: [PATCH 14/24] * Fix bug #12332. --- module/todo/js/common.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/todo/js/common.js b/module/todo/js/common.js index 65789831af..ecff38d232 100644 --- a/module/todo/js/common.js +++ b/module/todo/js/common.js @@ -53,8 +53,12 @@ function loadList(type, id) { link = createLink('review', 'ajaxGetUserReviews', param); } + else if(type == 'feedback') + { + link = createLink('feedback', 'ajaxGetUserFeedback', param); + } - if(type == 'bug' || type == 'task' || type == 'story' || type == 'issue' || type == 'risk' || type == 'testtask' || type == 'review' ) + if(type == 'bug' || type == 'task' || type == 'story' || type == 'issue' || type == 'risk' || type == 'testtask' || type == 'review' || type == 'feedback') { $.get(link, function(data, status) { From fd03cbbb805c047b4d246e55de4d92221dd27660 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Mon, 26 Apr 2021 15:03:51 +0800 Subject: [PATCH 15/24] * Link the plan stories when edit the project. --- module/project/control.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/module/project/control.php b/module/project/control.php index 72a554689a..0a4c927da4 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -400,6 +400,14 @@ class project extends control if($_POST) { + $oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs('plan'); + $oldPlanStories = $this->dao->select('t1.story')->from(TABLE_PROJECTSTORY)->alias('t1') + ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.project=t2.project') + ->where('t1.project')->eq($projectID) + ->andWhere('t2.plan')->in(array_keys($oldPlans)) + ->fetchAll('story'); + $diffResult = array_diff($oldPlans, $_POST['plans']); + $changes = $this->project->update($projectID); if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); @@ -409,6 +417,31 @@ class project extends control $this->action->logHistory($actionID, $changes); } + /* Link the plan stories. */ + if(!empty($_POST['plans']) and !empty($diffResult)) + { + $this->dao->delete()->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($oldPlanStories))->exec(); + foreach($_POST['plans'] as $planID) + { + $planStories = $planProducts = array(); + $planStory = $this->loadModel('story')->getPlanStories($planID); + if(!empty($planStory)) + { + foreach($planStory as $id => $story) + { + if($story->status == 'draft') + { + unset($planStory[$id]); + continue; + } + $planProducts[$story->id] = $story->product; + } + $planStories = array_keys($planStory); + $this->execution->linkStory($projectID, $planStories, $planProducts); + } + } + } + $locateLink = $this->session->projectList ? $this->session->projectList : 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"); From c7a282cdd367ca7434d0cb9b6c264eeb3614f5d4 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 26 Apr 2021 15:24:29 +0800 Subject: [PATCH 16/24] * Fix bug #12401. --- module/product/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index 2ae7a771db..1d9c4b9207 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -26,7 +26,7 @@
type == 'platform'):?>
-
product->branchName['platform'];?>
+
product->branchName['platform'];?>id}")?>">
    From 09f16fe1b44e7ed8375fdb02b819c71d45ddf696 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 26 Apr 2021 15:25:42 +0800 Subject: [PATCH 17/24] * Fix bug#12376. --- module/product/view/browse.html.php | 1 + module/projectrelease/control.php | 1 + module/projectrelease/view/view.html.php | 2 +- module/story/control.php | 23 +++++++++++++++-------- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 9b10f31353..d04443ca66 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -341,6 +341,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
moduleName = $this->app->rawModule; - $this->methodName = $this->app->rawMethod; - foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem) + foreach(customModel::getFeatureMenu($this->app->rawModule, $this->app->rawMethod) as $menuItem) { if(isset($menuItem->hidden)) continue; if($menuItem->name == 'emptysr' && $storyType == 'story') continue; From f2fb924b0cb8cadafe912e25a74c8ebde7e65bed Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 16:58:29 +0800 Subject: [PATCH 22/24] * Fix bug #12189. --- module/execution/control.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/execution/control.php b/module/execution/control.php index ff9790639d..d9b8526fc4 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2824,6 +2824,10 @@ class execution extends control $this->fetch('file', 'export2' . $this->post->fileType, $_POST); } + $this->loadModel('project'); + $project = $this->project->getByID($this->session->project); + if($project->model == 'waterfall') $this->lang->executionCommon = $this->lang->project->stage; + $this->view->fileName = (in_array($status, array('all', 'undone')) ? $this->lang->execution->$status : $this->lang->execution->statusList[$status]) . $this->lang->executionCommon; $this->display(); From 6141efa38c36cd3d0741d3c97979856aa79ef989 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 17:12:04 +0800 Subject: [PATCH 23/24] * Fix bug #12405. --- module/execution/model.php | 8 ++++++++ module/repo/lang/de.php | 1 + module/repo/lang/en.php | 1 + module/repo/lang/fr.php | 1 + module/repo/lang/vi.php | 1 + module/repo/lang/zh-cn.php | 2 +- 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 98d21220cf..a65a6ec287 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -69,6 +69,14 @@ class executionModel extends model /* Unset story, bug, build and testtask if type is ops. */ $execution = $this->getByID($executionID); + if($execution->type == 'stage') + { + global $lang; + $this->loadModel('execution'); + $lang->executionCommon = $lang->project->stage; + include $this->app->getModulePath('execution') . 'lang/' . $this->app->getClientLang() . '.php'; + } + if($execution and $execution->lifetime == 'ops') { unset($this->lang->execution->menu->story); diff --git a/module/repo/lang/de.php b/module/repo/lang/de.php index 5a7cb805fb..bf3115dcdf 100644 --- a/module/repo/lang/de.php +++ b/module/repo/lang/de.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Repo'; $lang->repo->browse = 'View'; $lang->repo->viewRevision = 'View Revision'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Create'; $lang->repo->createAction = 'Create Repo'; $lang->repo->maintain = 'Repo List'; diff --git a/module/repo/lang/en.php b/module/repo/lang/en.php index eee7437991..b3e3dc2c0d 100644 --- a/module/repo/lang/en.php +++ b/module/repo/lang/en.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Repo'; $lang->repo->browse = 'View'; $lang->repo->viewRevision = 'View Revision'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Create'; $lang->repo->maintain = 'Repo List'; $lang->repo->edit = 'Edit'; diff --git a/module/repo/lang/fr.php b/module/repo/lang/fr.php index 3f011c9ee1..c721198dc5 100644 --- a/module/repo/lang/fr.php +++ b/module/repo/lang/fr.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Référentiel'; $lang->repo->browse = 'Aff'; $lang->repo->viewRevision = 'Aff Modifs'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Créer'; $lang->repo->createAction = 'Créer Ref'; $lang->repo->maintain = 'Liste Ref'; diff --git a/module/repo/lang/vi.php b/module/repo/lang/vi.php index c10b46b417..8bb4b65b87 100644 --- a/module/repo/lang/vi.php +++ b/module/repo/lang/vi.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Repo'; $lang->repo->browse = 'Xem'; $lang->repo->viewRevision = 'Xem Revision'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Tạo'; $lang->repo->createAction = 'Tạo Repo'; $lang->repo->maintain = 'Repo danh sách'; diff --git a/module/repo/lang/zh-cn.php b/module/repo/lang/zh-cn.php index 84cf76f53d..d073a70b36 100644 --- a/module/repo/lang/zh-cn.php +++ b/module/repo/lang/zh-cn.php @@ -3,7 +3,7 @@ $lang->repo->common = '代码'; $lang->repo->browse = '浏览'; $lang->repo->viewRevision = '查看修订'; $lang->repo->product = '所属产品'; -$lang->repo->execution = '所属' . $lang->executionCommon; +$lang->repo->execution = '所属' . $lang->execution->common; $lang->repo->create = '创建'; $lang->repo->maintain = '版本库列表'; $lang->repo->edit = '编辑'; From a20f580a5db0366e5971421494e96e4f8ec6f43e Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 17:29:18 +0800 Subject: [PATCH 24/24] * Fix bug #12402. --- module/action/view/trash.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 918bd224d7..d29da838b8 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -54,8 +54,8 @@ $methodName = 'view'; if($module == 'caselib') { - $methodName = 'libview'; - $module = 'testsuite'; + $methodName = 'view'; + $module = 'caselib'; } if(isset($config->action->customFlows[$action->objectType])) {