From a7f907598032f3504153bee6ecfd6d57c81054a4 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 19 Apr 2021 09:25:36 +0800 Subject: [PATCH 01/11] * Highlight navigation when create program. --- module/common/lang/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 7785d4410e..b9b61db679 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -113,7 +113,7 @@ $lang->my->dividerMenu = ',work,dynamic,'; /* Program menu. */ $lang->program->homeMenu = new stdclass(); -$lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|"); +$lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|", 'alias' => 'create'); $lang->program->menu = new stdclass(); $lang->program->menu->product = array('link' => "{$lang->product->common}|program|product|programID=%s", 'alias' => 'view'); From 1470b4930853a2fd1eaae8912a28430046b52a60 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 19 Apr 2021 09:41:27 +0800 Subject: [PATCH 02/11] * Fix bug #12196. --- module/testtask/control.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/testtask/control.php b/module/testtask/control.php index 2c6e287dc6..16a842a547 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1294,6 +1294,13 @@ class testtask extends control $this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = ''; $this->loadModel('project')->setMenu($this->session->project); $this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits'); + + /* Replace language. */ + $project = $this->project->getByID($this->session->project); + if(!empty($project->model) and $project->model == 'waterfall') + { + $this->lang->testtask->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->testtask->execution); + } } else { From f54be0f26c2603b50ff79f23b29616914bd5fe48 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 19 Apr 2021 10:07:00 +0800 Subject: [PATCH 03/11] * Fix the highlight problem of site navigation. --- module/common/lang/menu.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 7785d4410e..8ee7d247f1 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -57,10 +57,10 @@ $lang->mainNav->menuOrder[50] = 'admin'; $lang->my->menu = new stdclass(); $lang->my->menu->index = array('link' => "$lang->dashboard|my|index"); $lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo'); -$lang->my->menu->work = array('link' => "{$lang->my->work}|my|work|mode=task", 'subModule' => 'task,review'); +$lang->my->menu->work = array('link' => "{$lang->my->work}|my|work|mode=task", 'subModule' => 'task'); if($config->systemMode == 'new') $lang->my->menu->project = array('link' => "{$lang->project->common}|my|project|"); $lang->my->menu->execution = array('link' => "{$lang->execution->common}|my|execution|type=undone"); -$lang->my->menu->contribute = array('link' => "$lang->contribute|my|contribute|mode=task", 'subModule' => 'review'); +$lang->my->menu->contribute = array('link' => "$lang->contribute|my|contribute|mode=task"); $lang->my->menu->dynamic = array('link' => "$lang->dynamic|my|dynamic|"); if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score'); $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|"); From b75eef360b525c38b311499b3d2625286ee4cb6c Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 19 Apr 2021 10:05:42 +0800 Subject: [PATCH 04/11] * The bind field should be 1 when create independent product. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 1e459807cc..3c8a60aa8e 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -758,7 +758,7 @@ class projectModel extends model /* If parent not empty, link products or create products. */ $product = new stdclass(); $product->name = $this->post->productName ? $this->post->productName : $project->name; - $product->bind = $this->post->productName ? 0 : 1; + $product->bind = $this->post->parent ? 0 : 1; $product->program = $project->parent ? current(array_filter(explode(',', $program->path))) : 0; $product->acl = $project->acl = 'open' ? 'open' : 'private'; $product->PO = $project->PM; From cab9785e00c0bfc4c20081df2f5158f18cf436bf Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 19 Apr 2021 11:25:18 +0800 Subject: [PATCH 05/11] * Fix upgrade logic. --- module/upgrade/control.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/module/upgrade/control.php b/module/upgrade/control.php index 5169770ffb..52b0fc460b 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -23,10 +23,7 @@ class upgrade extends control $upgradeFile = $this->app->wwwRoot . 'upgrade.php'; if(!file_exists($upgradeFile)) $this->locate($this->createLink('my', 'index')); - if((version_compare($this->config->installedVersion, '15', '<') - || strpos($this->config->installedVersion, 'biz') !== false - || strpos($this->config->installedVersion, 'pro') !== false) - && strpos($this->config->installedVersion, 'max') === false) + if(!isset($this->config->systemMode) || !isset($this->config->qcVersion)) { /* Judge upgrade step. */ $upgradeStep = $this->loadModel('setting')->getItem('owner=system&module=common§ion=global&key=upgradeStep'); @@ -137,11 +134,7 @@ class upgrade extends control if(!$this->upgrade->isError()) { - if((version_compare($fromVersion, '15', '<') - || strpos($fromVersion, 'biz') !== false - || strpos($fromVersion, 'pro') !== false) - && strpos($fromVersion, 'max') === false - && !isset($this->config->qcVersion)) $this->locate(inlink('to15Guide', "fromVersion=$fromVersion")); + if(!isset($this->config->systemMode) && !isset($this->config->qcVersion)) $this->locate(inlink('to15Guide', "fromVersion=$fromVersion")); $this->locate(inlink('afterExec', "fromVersion=$fromVersion")); } From 796bafb2cac3676f842aa19f7b7971e4c353bf53 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 19 Apr 2021 11:43:31 +0800 Subject: [PATCH 06/11] * Fix execution team info error. --- module/execution/control.php | 1 + module/execution/js/team.js | 4 ++++ module/execution/view/team.html.php | 11 ++++++++++- module/user/control.php | 2 +- module/user/lang/de.php | 3 ++- module/user/lang/en.php | 1 + module/user/lang/fr.php | 3 ++- module/user/lang/vi.php | 3 ++- module/user/lang/zh-cn.php | 1 + 9 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 module/execution/js/team.js diff --git a/module/execution/control.php b/module/execution/control.php index 2e1da26665..45b6407b93 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1177,6 +1177,7 @@ class execution extends control $this->view->title = $title; $this->view->position = $position; + $this->view->deptUsers = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. $this->display(); diff --git a/module/execution/js/team.js b/module/execution/js/team.js new file mode 100644 index 0000000000..d58ba42f6b --- /dev/null +++ b/module/execution/js/team.js @@ -0,0 +1,4 @@ +function checkUserDept(userID) +{ + alert(noAccess); +} diff --git a/module/execution/view/team.html.php b/module/execution/view/team.html.php index 64c9f952c0..642471af10 100644 --- a/module/execution/view/team.html.php +++ b/module/execution/view/team.html.php @@ -12,6 +12,7 @@ ?> execution->confirmUnlinkMember)?> +user->error->noAccess)?>