From ca70d4d63c877ee8954c878c85fd431e7610316f Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 1 Nov 2022 14:20:57 +0800 Subject: [PATCH] * Finish task #74322, #74326. --- db/update17.7.sql | 13 +++++++++++++ module/tree/control.php | 1 + module/tree/lang/de.php | 1 + module/tree/lang/en.php | 1 + module/tree/lang/fr.php | 1 + module/tree/lang/zh-cn.php | 1 + 6 files changed, 18 insertions(+) create mode 100644 db/update17.7.sql diff --git a/db/update17.7.sql b/db/update17.7.sql new file mode 100644 index 0000000000..6203daef55 --- /dev/null +++ b/db/update17.7.sql @@ -0,0 +1,13 @@ +ALTER TABLE `zt_chart` ADD `group` mediumint(8) unsigned NOT NULL default '0' AFTER `type`; +ALTER TABLE `zt_chart` MODIFY COLUMN `desc` text NOT NULL; +ALTER TABLE `zt_chart` ADD `editedBy` varchar(30) NOT NULL AFTER `createdDate`; +ALTER TABLE `zt_chart` ADD `editedDate` datetime NOT NULL AFTER `editedBy`; + +INSERT INTO `zt_module` (`company`, `root`, `branch`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`, `collector`, `short`, `deleted`) VALUES +(0, 0, 0, '产品', 0, ',0,', 1, 10, 'bi', '', '', '', '0'), +(0, 0, 0, '项目', 0, ',0,', 1, 20, 'bi', '', '', '', '0'), +(0, 0, 0, '测试', 0, ',0,', 1, 30, 'bi', '', '', '', '0'), +(0, 0, 0, '组织', 0, ',0,', 1, 40, 'bi', '', '', '', '0'); + +UPDATE `zt_chart` SET `group` = (SELECT `id` FROM `zt_module` WHERE `type` = 'bi' AND `name` = '产品' limit 1); +UPDATE `zt_module` SET `path` = CONCAT(',', `id`, ',') WHERE `type` = 'bi' AND `name` in ('产品', '项目', '测试', '组织'); diff --git a/module/tree/control.php b/module/tree/control.php index 49ac28269b..d26b24104f 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -486,6 +486,7 @@ class tree extends control if($module->type == 'doc') $confirmLang = $this->lang->tree->confirmDeleteMenu; if($module->type == 'line') $confirmLang = $this->lang->tree->confirmDeleteLine; if($module->type == 'host') $confirmLang = $this->lang->tree->confirmDeleteHost; + if($module->type == 'bi') $confirmLang = $this->lang->tree->confirmDeleteGroup; 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 873170ee81..4b77b51949 100755 --- a/module/tree/lang/de.php +++ b/module/tree/lang/de.php @@ -43,6 +43,7 @@ $lang->tree->confirmDelete = 'Do you want to delete this module and its c $lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?'; $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->confirmDeleteGroup = 'Do you want to delete this group and its child groups?'; $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?"; $lang->tree->noSubmodule = "There are no copyable submodules under the current module!"; diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php index 611025a4d0..9bbe279655 100755 --- a/module/tree/lang/en.php +++ b/module/tree/lang/en.php @@ -43,6 +43,7 @@ $lang->tree->confirmDelete = 'Do you want to delete this module and its c $lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?'; $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->confirmDeleteGroup = 'Do you want to delete this group and its child groups?'; $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?"; $lang->tree->noSubmodule = "There are no copyable submodules under the current module!"; diff --git a/module/tree/lang/fr.php b/module/tree/lang/fr.php index 3d5f6bb04c..77d1df5655 100755 --- a/module/tree/lang/fr.php +++ b/module/tree/lang/fr.php @@ -42,6 +42,7 @@ $lang->tree->addChild = "Ajout Sous-Module"; $lang->tree->confirmDelete = 'Voulez-vous supprimer ce module et tous ses sous-modules ?'; $lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?'; $lang->tree->confirmDelCategory = 'Voulez-vous supprimer cette catégorie et ses sous-catégories?'; +$lang->tree->confirmDeleteGroup = 'Do you want to delete this group and its child groups?'; $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 ?"; diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php index 9050ff21e9..7acc707f6c 100755 --- a/module/tree/lang/zh-cn.php +++ b/module/tree/lang/zh-cn.php @@ -43,6 +43,7 @@ $lang->tree->confirmDelete = '该模块及其子模块都会被删除, $lang->tree->confirmDeleteMenu = '该目录及其子目录都会被删除,您确定删除吗?'; $lang->tree->confirmDelCategory = '该分类及其子分类都会被删除,您确定删除吗?'; $lang->tree->confirmDeleteLine = "您确定删除该{$lang->productCommon}线吗?"; +$lang->tree->confirmDeleteGroup = '该分组及其子分组都会被删除,您确定删除吗?'; $lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的{$lang->SRCommon}、Bug、用例的所属{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; $lang->tree->confirmRoot4Doc = "修改所属文档库,会同时修改该分类下文档的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; $lang->tree->noSubmodule = "当前模块下没有可复制的子模块!";