From f1954b3dab13756d48a60e849647db5104dbbdb1 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 22 Apr 2021 09:37:34 +0800 Subject: [PATCH 1/3] * Fix bug #12275. --- module/common/lang/menu.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 89de4b59ce..f4636bf1a6 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -40,7 +40,7 @@ $lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common} $lang->mainNav->system = "{$lang->navIcons['system']} {$lang->system->common}|my|team|"; $lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|admin|index|"; -$lang->dividerMenu = ',doc,admin,'; +$lang->dividerMenu = ',doc,oa,admin,'; $lang->mainNav->menuOrder[5] = 'my'; if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program'; $lang->mainNav->menuOrder[15] = 'product'; @@ -50,8 +50,8 @@ $lang->mainNav->menuOrder[23] = 'qa'; $lang->mainNav->menuOrder[25] = 'devops'; $lang->mainNav->menuOrder[30] = 'doc'; $lang->mainNav->menuOrder[35] = 'report'; -$lang->mainNav->menuOrder[45] = 'system'; -$lang->mainNav->menuOrder[50] = 'admin'; +$lang->mainNav->menuOrder[40] = 'system'; +$lang->mainNav->menuOrder[55] = 'admin'; /* My menu. */ $lang->my->menu = new stdclass(); From 89ec9cec9cb167200e120e46e7c9ced1b1fa4ffc Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 22 Apr 2021 11:35:45 +0800 Subject: [PATCH 2/3] * Fix bug#12065. --- module/tree/control.php | 1 + module/tree/lang/de.php | 3 +++ module/tree/lang/en.php | 3 +++ module/tree/lang/fr.php | 3 +++ module/tree/lang/vi.php | 3 +++ module/tree/lang/zh-cn.php | 3 +++ module/tree/lang/zh-tw.php | 3 +++ module/tree/view/browse.html.php | 4 ++-- 8 files changed, 21 insertions(+), 2 deletions(-) diff --git a/module/tree/control.php b/module/tree/control.php index 214b4c6bdd..9056f04181 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -398,6 +398,7 @@ class tree extends control $confirmLang = $this->lang->tree->confirmDelete; if($module->type == 'line') $confirmLang = $this->lang->tree->confirmDeleteLine; if($module->type == 'host') $confirmLang = $this->lang->tree->confirmDeleteHost; + if($module->type == 'feedback') $confirmLang = $this->lang->tree->confirmDelCategory; die(js::confirm($confirmLang, $this->createLink('tree', 'delete', "rootID=$rootID&moduleID=$moduleID&confirm=yes"))); } else diff --git a/module/tree/lang/de.php b/module/tree/lang/de.php index 992bb73ca6..44d1c984a0 100644 --- a/module/tree/lang/de.php +++ b/module/tree/lang/de.php @@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Ziehen und Sotieren"; $lang->tree->sort = "Sortieren"; $lang->tree->addChild = "Hinzufügen"; $lang->tree->confirmDelete = 'Do you want to delete this module and its child modules?'; +$lang->tree->confirmDelCategory = 'Möchten Sie diese Kategorie und ihre Kinderkategorien löschen?'; $lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?"; $lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?"; $lang->tree->confirmRoot4Doc = "Any changes to the library will change the document of library it belongs to, which is dangerous. Do you want to change it?"; @@ -57,6 +58,8 @@ $lang->tree->parent = 'Übergeordnet'; $lang->tree->parentCate = 'Parent Category'; $lang->tree->child = 'Untergeordnet'; $lang->tree->subCategory = 'SubCategory'; +$lang->tree->editCategory = 'Kategorie bearbeiten'; +$lang->tree->delCategory = 'Kategorie löschen'; $lang->tree->lineChild = "Child {$lang->productCommon} Line"; $lang->tree->owner = 'Besitzer'; $lang->tree->order = 'Reihenfolge'; diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php index ea5bae5d3e..504aeb7b7a 100644 --- a/module/tree/lang/en.php +++ b/module/tree/lang/en.php @@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Drag to order"; $lang->tree->sort = "Order"; $lang->tree->addChild = "Add Child Module"; $lang->tree->confirmDelete = 'Do you want to delete this module and its child modules?'; +$lang->tree->confirmDelCategory = 'Do you want to delete this category and its child categories?'; $lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?"; $lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?"; $lang->tree->confirmRoot4Doc = "Any changes to the library will change the document of library it belongs to, which is dangerous. Do you want to change it?"; @@ -57,6 +58,8 @@ $lang->tree->parent = 'Parent Module'; $lang->tree->parentCate = 'Parent Category'; $lang->tree->child = 'Children'; $lang->tree->subCategory = 'SubCategory'; +$lang->tree->editCategory = 'Edit Category'; +$lang->tree->delCategory = 'Delete Category'; $lang->tree->lineChild = "Child {$lang->productCommon} Line"; $lang->tree->owner = 'Owner'; $lang->tree->order = 'Order'; diff --git a/module/tree/lang/fr.php b/module/tree/lang/fr.php index 28ce3650c6..079ba1a056 100644 --- a/module/tree/lang/fr.php +++ b/module/tree/lang/fr.php @@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Faites glisser pour ordonner"; $lang->tree->sort = "Ordonnez"; $lang->tree->addChild = "Ajout Sous-Module"; $lang->tree->confirmDelete = 'Voulez-vous supprimer ce module et tous ses sous-modules ?'; +$lang->tree->confirmDelCategory = 'Voulez-vous supprimer cette catégorie et ses sous-catégories?'; $lang->tree->confirmDeleteLine = 'Voulez-vous supprimer cette ligne de produit ?'; $lang->tree->confirmRoot = "Les changements du {$lang->productCommon} vont impacter les stories, bugs, casTests du {$lang->productCommon} auquel ils appartiennent, ainsi que les associations de {$lang->executionCommon} et {$lang->productCommon}, ce qui est dangereux. Voulez-vous malgré tout effectuer le changement ?"; $lang->tree->confirmRoot4Doc = "Toute modification apportée à la bibliothèque modifiera le document de la bibliothèque à laquelle elle appartient, ce qui est dangereux. Voulez-vous le changer ?"; @@ -57,6 +58,8 @@ $lang->tree->parent = 'Module Parent'; $lang->tree->parentCate = 'Catégorie Parente'; $lang->tree->child = 'Enfants'; $lang->tree->subCategory = 'SubCategory'; +$lang->tree->editCategory = 'Modifier la catégorie'; +$lang->tree->delCategory = 'Supprimer la catégorie'; $lang->tree->lineChild = 'Sous-Ligne Produit'; $lang->tree->owner = 'Propriétaire'; $lang->tree->order = 'Ordre'; diff --git a/module/tree/lang/vi.php b/module/tree/lang/vi.php index e654d4fa27..966243e7b1 100644 --- a/module/tree/lang/vi.php +++ b/module/tree/lang/vi.php @@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Drag để sắp xếp"; $lang->tree->sort = "Thứ tự"; $lang->tree->addChild = "Thêm Module con"; $lang->tree->confirmDelete = 'Bạn có muốn xóa module này và module con của nó?'; +$lang->tree->confirmDelCategory = 'Bạn có muốn xoá hạng mục này và loại con của nó không?'; $lang->tree->confirmDeleteLine = "Bạn có muốn xóa dòng {$lang->productCommon} này không?"; $lang->tree->confirmRoot = "Mọi sự thay đổi tới {$lang->productCommon} này sẽ thay đổi the câu chuyện, bugs, tình huống của {$lang->productCommon} nó sở hữu, cũng như liên kết của {$lang->executionCommon} và {$lang->productCommon}, điều này nguy hiểm. Bạn có muốn thay đổi nó?"; $lang->tree->confirmRoot4Doc = "Mọi sự thay đổi tới thư viện này sẽ thay đổi thư viện tài liệu nó sở hữu, điều này nguy hiểm. Bạn có muốn thay đổi nó?"; @@ -57,6 +58,8 @@ $lang->tree->parent = 'Module mẹ'; $lang->tree->parentCate = 'Danh mục mẹ'; $lang->tree->child = 'Con'; $lang->tree->subCategory = 'SubCategory'; +$lang->tree->editCategory = 'Sửa phân loại'; +$lang->tree->delCategory = 'Xoá phân loại'; $lang->tree->lineChild = "Dòng {$lang->productCommon} con"; $lang->tree->owner = 'Sở hữu'; $lang->tree->order = 'Sắp xếp'; diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php index 0e9f885d1e..45e6fee09a 100644 --- a/module/tree/lang/zh-cn.php +++ b/module/tree/lang/zh-cn.php @@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "拖放排序"; $lang->tree->sort = "排序"; $lang->tree->addChild = "增加子模块"; $lang->tree->confirmDelete = '该模块及其子模块都会被删除,您确定删除吗?'; +$lang->tree->confirmDelCategory = '该分类及其子分类都会被删除,您确定删除吗?'; $lang->tree->confirmDeleteLine = "您确定删除该{$lang->productCommon}线吗?"; $lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的{$lang->SRCommon}、Bug、用例的所属{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; $lang->tree->confirmRoot4Doc = "修改所属文档库,会同时修改该分类下文档的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; @@ -57,6 +58,8 @@ $lang->tree->parent = '上级模块'; $lang->tree->parentCate = '上级分类'; $lang->tree->child = '子模块'; $lang->tree->subCategory = '子分类'; +$lang->tree->editCategory = '编辑分类'; +$lang->tree->delCategory = '删除分类'; $lang->tree->lineChild = "子{$lang->productCommon}线"; $lang->tree->owner = '负责人'; $lang->tree->order = '排序'; diff --git a/module/tree/lang/zh-tw.php b/module/tree/lang/zh-tw.php index 7fa68b911a..bd032a8ec5 100644 --- a/module/tree/lang/zh-tw.php +++ b/module/tree/lang/zh-tw.php @@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "拖放排序"; $lang->tree->sort = "排序"; $lang->tree->addChild = "增加子模組"; $lang->tree->confirmDelete = '該模組及其子模組都會被刪除,您確定刪除嗎?'; +$lang->tree->confirmDelCategory = '該分類及其子分類都會被删除,您確定删除嗎?'; $lang->tree->confirmDeleteLine = "您確定刪除該{$lang->productCommon}綫嗎?"; $lang->tree->confirmRoot = "模組的所屬{$lang->productCommon}修改,會關聯修改該模組下的{$lang->SRCommon}、Bug、用例的所屬{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的關聯關係。該操作比較危險,請謹慎操作。是否確認修改?"; $lang->tree->confirmRoot4Doc = "修改所屬文檔庫,會同時修改該分類下文檔的關聯關係。該操作比較危險,請謹慎操作。是否確認修改?"; @@ -57,6 +58,8 @@ $lang->tree->parent = '上級模組'; $lang->tree->parentCate = '上級分類'; $lang->tree->child = '子模組'; $lang->tree->subCategory = '子分類'; +$lang->tree->editCategory = '編輯分類'; +$lang->tree->delCategory = '删除分類'; $lang->tree->lineChild = "子{$lang->productCommon}綫"; $lang->tree->owner = '負責人'; $lang->tree->order = '排序'; diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 31b4be88d6..84dcf40d6d 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -211,13 +211,13 @@ $(function() edit: { linkTemplate: '', - title: 'doc->editType : $lang->tree->edit ?>', + title: 'doc->editType : ($viewType == 'feedback' ? $lang->tree->editCategory : $lang->tree->edit);?>', template: '' }, "delete": { linkTemplate: '', - title: 'doc->deleteType : $lang->tree->delete ?>', + title: 'doc->deleteType : ($viewType == 'feedback' ? $lang->tree->delCategory : $lang->tree->delete)?>', template: '' }, subModules: From 64406fe023846c873e7d043fd094eadc8bde3b76 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 22 Apr 2021 11:38:54 +0800 Subject: [PATCH 3/3] * Fix bug #12272. --- module/execution/control.php | 29 +++++---------------------- module/execution/js/create.js | 2 +- module/execution/model.php | 16 +++++++-------- module/execution/view/create.html.php | 4 ++++ module/execution/view/edit.html.php | 22 +------------------- module/project/model.php | 10 +-------- 6 files changed, 20 insertions(+), 63 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 2f811cddfb..a66633ab55 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1231,12 +1231,6 @@ class execution extends control } } - $project = $this->project->getByID($projectID); - if(!empty($project->model) and $project->model == 'waterfall') - { - $this->lang->execution->afterInfo = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->afterInfo); - } - $this->view->title = $this->lang->execution->tips; $this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID"); $this->view->executionID = $executionID; @@ -1317,6 +1311,11 @@ class execution extends control } } + if(!empty($project->model) and $project->model == 'waterfall') + { + $this->lang->execution->type = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->type); + } + $this->view->title = (($this->app->openApp == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create; $this->view->position[] = $this->view->title; $this->view->executions = array('' => '') + $this->execution->getList($projectID); @@ -1433,23 +1432,6 @@ class execution extends control $productPlans[$product->id] = $this->productplan->getPairs($product->id); } - $isSprint = true; - if($this->config->systemMode == 'new') - { - $project = $this->project->getById($execution->project); - if($project->model == 'scrum') - { - unset($this->lang->execution->endList[62]); - unset($this->lang->execution->endList[93]); - unset($this->lang->execution->endList[186]); - unset($this->lang->execution->endList[365]); - } - else - { - $isSprint = false; - } - } - $this->loadModel('user'); $poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst', $execution->PO, $this->config->maxCount); if(!empty($this->config->user->moreLink)) $this->config->moreLinks["PM"] = $this->config->user->moreLink; @@ -1478,7 +1460,6 @@ class execution extends control $this->view->unmodifiableProducts = $unmodifiableProducts; $this->view->productPlans = $productPlans; $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches); - $this->view->isSprint = $isSprint; $this->display(); } diff --git a/module/execution/js/create.js b/module/execution/js/create.js index e8eb321238..e3290b67ff 100644 --- a/module/execution/js/create.js +++ b/module/execution/js/create.js @@ -38,7 +38,7 @@ $(function() var adjustMainCol = function() { - $('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10)); + if(!isStage) $('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10)); }; adjustMainCol(); $(window).on('resize', adjustMainCol); diff --git a/module/execution/model.php b/module/execution/model.php index 0947eb1b95..e3f33659d8 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -274,7 +274,7 @@ class executionModel extends model */ public function create($copyExecutionID = '') { - $sprintType = 'sprint'; + $type = 'sprint'; $this->lang->execution->team = $this->lang->execution->teamname; if($this->config->systemMode == 'new') @@ -286,14 +286,14 @@ class executionModel extends model } /* Determine whether to add a sprint or a stage according to the model of the execution. */ - $project = $this->getByID($_POST['project']); - $sprintType = zget($this->config->execution->modelList, $project->model, 'sprint'); + $project = $this->loadModel('project')->getByID($_POST['project']); + $type = zget($this->config->execution->modelList, $project->model, 'sprint'); $this->config->execution->create->requiredFields .= ',project'; } /* If the execution model is a stage, determine whether the product is linked. */ - if($sprintType == 'stage' and empty($this->post->products[0])) + if($type == 'stage' and empty($this->post->products[0])) { dao::$errors['message'][] = $this->lang->execution->noLinkProduct; return false; @@ -311,7 +311,7 @@ class executionModel extends model ->setIF($this->config->systemMode == 'new', 'parent', $this->post->project) ->setIF($this->post->acl == 'open', 'whitelist', '') ->join('whitelist', ',') - ->add('type', $sprintType) + ->add('type', $type) ->stripTags($this->config->execution->editor->create['id'], $this->config->allowedTags) ->remove('products, workDays, delta, branch, uid, plans') ->get(); @@ -360,7 +360,7 @@ class executionModel extends model $member->root = $executionID; $member->join = $today; $member->days = $sprint->days; - $member->type = $sprintType; + $member->type = $type; $this->dao->insert(TABLE_TEAM)->data($member)->exec(); if($member->account == $this->app->user->account) $creatorExists = true; } @@ -375,7 +375,7 @@ class executionModel extends model $member->account = $this->app->user->account; $member->role = zget($this->lang->user->roleList, $this->app->user->role, ''); $member->join = $today; - $member->type = $sprintType; + $member->type = $type; $member->days = $sprint->days; $member->hours = $this->config->execution->defaultWorkhours; $this->dao->insert(TABLE_TEAM)->data($member)->exec(); @@ -840,7 +840,7 @@ class executionModel extends model */ public function getSwitcher($executionID, $currentModule, $currentMethod) { - if(in_array($currentMethod, array('index', 'all', 'batchedit'))) return; + if(in_array($currentMethod, array('index', 'all', 'batchedit', 'create'))) return; $currentExecutionName = $this->lang->execution->common; if($executionID) diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index e58434cc9d..ac2d15b0ce 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -10,9 +10,13 @@ * @link http://www.zentao.net */ ?> +openApp == 'execution'): ?> + + systemMode == 'new' ? $this->createLink('project', 'execution', "status=all&projectID=$projectID") : $this->createLink('execution', 'task', 'executionID=' . $executionID);?> +