From 531422c8a0b59d1dcb9f73864ec59e0f9d0cba8f Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 14 Mar 2022 16:07:45 +0800 Subject: [PATCH 1/6] * Modify the problem of deleting two out file commands. --- module/upgrade/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index c8ab0aa00e..34e4701090 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -5828,7 +5828,7 @@ class upgradeModel extends model } } - if(empty($customFiles) or $module == 'owt') $encryptModules[] = $module; + if(empty($customFiles) or $module == 'owt') $encryptModules[$module] = $module; } return $encryptModules; } From 37153ad060040897ddfba73eae0db819c93b9ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Mon, 14 Mar 2022 16:34:49 +0800 Subject: [PATCH 2/6] * Fix bug #20725 --- db/update12.5.3.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/update12.5.3.sql b/db/update12.5.3.sql index 68f393fde4..ddf17ef270 100644 --- a/db/update12.5.3.sql +++ b/db/update12.5.3.sql @@ -23,6 +23,9 @@ ALTER TABLE `zt_project` ADD `output` text NOT NULL AFTER `milestone`; ALTER TABLE `zt_project` ADD `lastEditedBy` varchar(30) NOT NULL DEFAULT '' AFTER `openedVersion`; ALTER TABLE `zt_project` ADD `lastEditedDate` datetime NOT NULL AFTER `lastEditedBy`; +ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; +ALTER TABLE `zt_case` ADD `execution` mediumint(8) unsigned NOT NULL AFTER `project`; + ALTER TABLE `zt_action` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_bug` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_build` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; @@ -30,7 +33,6 @@ ALTER TABLE `zt_burn` CHANGE `project` `execution` mediumint(8) unsigned NOT NUL ALTER TABLE `zt_doc` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `program` `project` mediumint(8) unsigned NOT NULL; -ALTER TABLE `zt_case` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_doclib` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_task` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; @@ -43,7 +45,6 @@ ALTER TABLE `zt_doclib` ADD `project` mediumint(8) unsigned NOT NULL AFTER `prod ALTER TABLE `zt_doc` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_story` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_bug` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; -ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testtask` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testreport` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testsuite` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; From dea36cfea3eed2c6f53ca49ae5eb320fc6584138 Mon Sep 17 00:00:00 2001 From: liyang <“liyang@easycorp.ltd”> Date: Mon, 14 Mar 2022 16:45:33 +0800 Subject: [PATCH 3/6] update data and add execution --- test/class/execution.class.php | 112 +++++++++++++++++++++ test/data/effort.yaml | 90 +++++++++++++++++ test/data/executionstory.yaml | 40 ++++++++ test/data/kanbancolumn.yaml | 4 - test/data/kanbancolumnproject.yaml | 4 - test/data/projectstory.yaml | 40 ++++++++ test/data/todo.yaml | 71 ++++++------- test/data/zentao/config.php | 4 + test/data/zt_todo.yaml | 14 ++- test/model/execution/addProjectMembers.php | 33 ++++++ test/model/execution/computeBurn.php | 26 +++++ test/model/execution/fixFirst.php | 31 ++++++ test/model/execution/getBurnDataFlot.php | 28 ++++++ test/model/execution/unlinkMember.php | 32 ++++++ 14 files changed, 478 insertions(+), 51 deletions(-) create mode 100644 test/data/effort.yaml create mode 100644 test/data/executionstory.yaml create mode 100644 test/data/projectstory.yaml create mode 100755 test/model/execution/addProjectMembers.php create mode 100755 test/model/execution/computeBurn.php create mode 100755 test/model/execution/fixFirst.php create mode 100755 test/model/execution/getBurnDataFlot.php create mode 100755 test/model/execution/unlinkMember.php diff --git a/test/class/execution.class.php b/test/class/execution.class.php index 70f5ab4e8b..0bb079d5ac 100644 --- a/test/class/execution.class.php +++ b/test/class/execution.class.php @@ -950,4 +950,116 @@ class executionTest } } } + + public function addProjectMembersTest($projectID = 0, $executionID, $count) + { + global $tester; + $tester->dbh->query("delete from zt_team where root = $projectID"); + $executionMembers = $tester->dao->select('`root`,`account`,`join`,`role`,`days`,`type`,`hours`')->from(TABLE_TEAM)->where('root')->eq($executionID)->fetchAll('account'); + $this->objectModel->addProjectMembers($projectID, $executionMembers); + $object = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($projectID)->fetchAll(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + return $object; + } + } + + public function unlinkMemberTest($sprintID, $account, $count) + { + global $tester; + $oldObject = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($sprintID)->fetchAll(); + $this->objectModel->unlinkMember($sprintID, $account); + $object = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($sprintID)->fetchAll(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($oldObject); + } + else + { + return $object; + } + } + + public function computeBurnTest($count) + { + $object = $this->objectModel->computeBurn(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + return $object; + } + } + + public function fixFirstTest($executionID, $count, $param = array()) + { + global $tester; + $date = date('Y-m-d'); + $createFields = array('estimate' => ''); + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + foreach($param as $key => $value) $_POST[$key] = $value; + $this->objectModel->computeBurn(); + $this->objectModel->fixFirst($executionID); + unset($_POST); + $object = $tester->dao->select('*')->from(TABLE_BURN)->where('execution')->eq($executionID)->andWhere('date')->eq($date)->fetchAll(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + if(empty($object)) + { + return '无数据'; + } + else + { + return $object; + } + } + } + + public function getBurnDataFlotTest($executionID = 0, $count) + { + $object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left'); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + return $object; + } + } } diff --git a/test/data/effort.yaml b/test/data/effort.yaml new file mode 100644 index 0000000000..1e458fa1d5 --- /dev/null +++ b/test/data/effort.yaml @@ -0,0 +1,90 @@ +title: table zt_effort +desc: "任务工时记录" +author: automated export +version: "1.0" +fields: + - field: id + note: "ID" + range: "1-10000" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: objectType + note: "对象类型" + range: "custom" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: objectID + note: "对象ID" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "产品ID" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: project + note: "项目ID" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: account + note: "用户账号" + fields: + - field: account1 + range: admin,user{99} + - field: account2 + range: [],1-99 + format: "" + - field: work + note: "工作内容" + range: "1-10000" + prefix: "这是工作内容" + postfix: "" + loop: 0 + format: "" + - field: date + note: "创建日期" + range: "(M)-(w)" + type: timestamp + prefix: "DateTime" + postfix: "" + format: "YY/MM/DD" + - field: left + note: "剩余" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: consumed + note: "消耗" + range: 1-100:5 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: begin + note: "开始" + range: 1000-1059:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: end + note: "结束" + range: 1400-1459:2 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/executionstory.yaml b/test/data/executionstory.yaml new file mode 100644 index 0000000000..08136cd670 --- /dev/null +++ b/test/data/executionstory.yaml @@ -0,0 +1,40 @@ +title: table zt_projectstory +desc: "项目需求关系" +author: automated export +version: "1.0" +fields: + - field: project + note: "项目ID" + range: 101-190{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "产品ID" + range: 1-10000{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: story + note: "需求ID" + range: 2-400:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: version + note: "版本" + range: 1 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: order + note: "排序" + range: 1,2 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/kanbancolumn.yaml b/test/data/kanbancolumn.yaml index 973e894b3e..ad5cd87243 100644 --- a/test/data/kanbancolumn.yaml +++ b/test/data/kanbancolumn.yaml @@ -3,8 +3,6 @@ desc: "" author: automated export version: "1.0" fields: - - field: lane - range: "0" - field: parent range: "0" - field: type @@ -22,8 +20,6 @@ fields: range: "" - field: order range: 1-4 - - field: cards - range: "" - field: archived range: "0" - field: deleted diff --git a/test/data/kanbancolumnproject.yaml b/test/data/kanbancolumnproject.yaml index f380021651..1ae6f3cd0f 100644 --- a/test/data/kanbancolumnproject.yaml +++ b/test/data/kanbancolumnproject.yaml @@ -5,8 +5,6 @@ version: "1.0" fields: - field: id range: 401-100000 - - field: lane - range: "0" - field: parent range: "0" - field: type @@ -23,8 +21,6 @@ fields: range: "" - field: order range: "0" - - field: cards - range: "" - field: archived range: "0" - field: deleted diff --git a/test/data/projectstory.yaml b/test/data/projectstory.yaml new file mode 100644 index 0000000000..268ffd98be --- /dev/null +++ b/test/data/projectstory.yaml @@ -0,0 +1,40 @@ +title: table zt_projectstory +desc: "项目需求关系" +author: automated export +version: "1.0" +fields: + - field: project + note: "项目ID" + range: 11-100{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "产品ID" + range: 1-10000{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: story + note: "需求ID" + range: 2-400:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: version + note: "版本" + range: 1 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: order + note: "排序" + range: 1,2 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/todo.yaml b/test/data/todo.yaml index 129fab9484..2bc762286c 100644 --- a/test/data/todo.yaml +++ b/test/data/todo.yaml @@ -1,65 +1,64 @@ title: table zt_todo desc: "待办" -author: automated export +author: ly version: "1.0" fields: - field: id note: "ID" - range: "1-10000" + range: 1-10000 prefix: "" postfix: "" loop: 0 format: "" - field: account - note: "用户账号" + note: "用户名" fields: - - field: account1 - range: test,dev - - field: account2 - range: 1-100 + - field: account1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: account2 + range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 prefix: "" postfix: "" loop: 0 format: "" - field: date note: "日期" - from: common.date.v1.yaml - use: dateB - prefix: "" + range: "(M)-(w)" + type: timestamp + prefix: "DateTime" postfix: "" - loop: 0 - format: "" + format: "YY/MM/DD" - field: begin note: "开始" - range: "1000-1300:R" + range: "1000-1059:2" prefix: "" postfix: "" loop: 0 format: "" - field: end note: "结束" - range: "1400-2000:R" + range: "1400-1459:2" prefix: "" postfix: "" loop: 0 format: "" - field: type note: "类型" - range: custom{20},bug{20},task{20},story{20},testtask{20} + range: custom,bug,task,story,testtask prefix: "" postfix: "" loop: 0 format: "" - field: idvalue note: "关联编号" - range: 0{20},1-20{20},1-20{20},1-20{20},1-20{20} + range: 0,1-20,1-20,1-20,1-20 prefix: "" postfix: "" loop: 0 format: "" - field: pri note: "优先级" - range: 1-4:R + range: 1-4 prefix: "" postfix: "" loop: 0 @@ -68,11 +67,11 @@ fields: note: "待办名称" fields: - field: name1 - range: "这是一个" + range: 自定义,BUG,任务,需求,测试单 - field: name2 - range: 自定义{20},BUG{20},任务{20},需求{20},测试单{20} + range: 1-200,1-200,1-200,1-200.1-200 prefix: "" - postfix: "的名称" + postfix: "的待办" loop: 0 format: "" - field: desc @@ -84,7 +83,7 @@ fields: format: "" - field: status note: "状态" - range: [wait,doing,done,closed]:R + range: wait,doing,done,closed prefix: "" postfix: "" loop: 0 @@ -98,35 +97,37 @@ fields: format: "" - field: config note: "配置" - range: 1-10000 - prefix: "这里待办json配置" + range: "" + prefix: "" postfix: "" - loop: 0 format: "" - field: assignedTo note: "指派给" - from: common.user.v1.yaml - use: user + fields: + - field: ass1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: ass2 + range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 prefix: "" postfix: "" - loop: 0 format: "" - field: assignedBy note: "由谁指派" - from: common.user.v1.yaml - use: user + fields: + - field: ass1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: ass2 + range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 prefix: "" postfix: "" - loop: 0 format: "" - field: assignedDate note: "指派日期" - from: common.date.v1.yaml - use: dateA - prefix: "" + range: "(M)-(w):60m" + type: timestamp + prefix: "DateTime" postfix: "" - loop: 0 - format: "" + format: "YY/MM/DD hh:mm:ss" - field: finishedBy note: "由谁完成" from: common.user.v1.yaml diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index 85994d8220..507db40578 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -3,6 +3,8 @@ $builder = new stdclass(); $builder->company = array('rows' => 1, 'extends' => array('company')); $builder->user = array('rows' => 1000, 'extends' => array('user')); +$builder->todo = array('rows' => 2000, 'extends' => array('todo')); +$builder->effort = array('rows' => 100, 'extends' => array('effort')); $builder->usergroup = array('rows' => 600, 'extends' => array('usergroup')); $builder->dept = array('rows' => 100, 'extends' => array('dept')); $builder->action = array('rows' => 100, 'extends' => array('action')); @@ -28,6 +30,8 @@ $builder->productline = array('rows' => 20, 'extends' => array('module', 'pr $builder->productplan = array('rows' => 30, 'extends' => array('productplan')); $builder->branch = array('rows' => 240, 'extends' => array('branch')); $builder->projectproduct = array('rows' => 200, 'extends' => array('projectproduct')); +$builder->projectstory = array('rows' => 200, 'extends' => array('projectstory')); +$builder->executionstory = array('rows' => 180, 'extends' => array('projectstory','executionstory')); $builder->kanbanspace = array('rows' => 50, 'extends' => array('kanbanspace')); $builder->kanban = array('rows' => 100, 'extends' => array('kanban')); diff --git a/test/data/zt_todo.yaml b/test/data/zt_todo.yaml index 46024752a6..e61da8cbb3 100644 --- a/test/data/zt_todo.yaml +++ b/test/data/zt_todo.yaml @@ -10,14 +10,12 @@ fields: postfix: "" loop: 0 format: "" - - field: account - note: "所有者" - from: common.user.v1.yaml - use: user - prefix: "" - postfix: "" - loop: 0 - format: "" + - field: account + - fields: + - field: account1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: account2 + range: []{2},1-99{2},1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 - field: date note: "日期" from: common.date.v1.yaml diff --git a/test/model/execution/addProjectMembers.php b/test/model/execution/addProjectMembers.php new file mode 100755 index 0000000000..b003ab4286 --- /dev/null +++ b/test/model/execution/addProjectMembers.php @@ -0,0 +1,33 @@ +#!/usr/bin/env php +addProjectMembersTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$projectIDList = array('11', '41', '71'); +$executionIDList = array('101', '131', '161', '1611'); +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[0])) && p('0:account,role') && e('po82,研发'); // 敏捷项目根据执行添加团队信息 +r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[0])) && p('0:account,role') && e('test22,测试'); // 瀑布项目根据执行添加团队信息 +r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板项目根据执行添加团队信息 +r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[1])) && p() && e('2'); // 敏捷项目根据执行添加团队信息统计 +r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[1])) && p() && e('1'); // 瀑布项目根据执行添加团队信息统计 +r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[1])) && p() && e('1'); // 看板项目根据执行添加团队信息统计 +system("./ztest init"); diff --git a/test/model/execution/computeBurn.php b/test/model/execution/computeBurn.php new file mode 100755 index 0000000000..0c4708c18c --- /dev/null +++ b/test/model/execution/computeBurn.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +computeBurnTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->computeBurnTest($count[0])) && p('700:executionName') && e('project600'); // 正常初始化 +r($execution->computeBurnTest($count[1])) && p() && e('516'); // 初始化后数据统计 diff --git a/test/model/execution/fixFirst.php b/test/model/execution/fixFirst.php new file mode 100755 index 0000000000..9f83aab0e9 --- /dev/null +++ b/test/model/execution/fixFirst.php @@ -0,0 +1,31 @@ +#!/usr/bin/env php +fixFirstTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$executionIDList = array('101', '131'); + +$scrumEstimate = array('estimate' => '25'); +$withLeft = array('estimate' => '21', 'withLeft' => '1'); +$waterfallEstimate = array('estimate' => '17', 'withLeft' => '1'); + +$execution = new executionTest(); +r($execution->fixFirstTest($executionIDList[0], $scrumEstimate)) && p('0:estimate') && e('26'); // 敏捷执行更新首日工时 +r($execution->fixFirstTest($executionIDList[0], $withLeft)) && p('0:estimate') && e('26'); // 敏捷执行更新首日剩余工时 +r($execution->fixFirstTest($executionIDList[1], $waterfallEstimate)) && p('0:left') && e('17'); // 瀑布执行更新首日剩余工时 diff --git a/test/model/execution/getBurnDataFlot.php b/test/model/execution/getBurnDataFlot.php new file mode 100755 index 0000000000..eb1794d37c --- /dev/null +++ b/test/model/execution/getBurnDataFlot.php @@ -0,0 +1,28 @@ +#!/usr/bin/env php +getBurnDataFlotTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$executionIDList = array('101', '131', '161'); +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('2'); // 瀑布执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行查询统计 diff --git a/test/model/execution/unlinkMember.php b/test/model/execution/unlinkMember.php new file mode 100755 index 0000000000..4f3513c639 --- /dev/null +++ b/test/model/execution/unlinkMember.php @@ -0,0 +1,32 @@ +#!/usr/bin/env php +unlinkMemberTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$accountList = array('user92', 'test22', 'test52'); +$executionIDList = array('101', '131', '161'); +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[0])) && p('0:account,role') && e('po82,研发'); // 敏捷执行解除团队成员 +r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[1])) && p() && e('1'); // 敏捷执行解除团队成员后统计 +r($execution->unlinkMemberTest($executionIDList[1], $accountList[1], $count[0])) && p() && e('0'); // 瀑布执行解除团队成员 +r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板执行解除团队成员 +r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[1])) && p() && e('1'); // 看板执行解除团队成员后统计 +system("./ztest init"); From 937c1a64ab2423438b15b9493a8739f7bad5f5d7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 14 Mar 2022 16:49:46 +0800 Subject: [PATCH 4/6] * Fix the problem that professional R&D Kanban does not have permission to view. --- module/group/lang/resource.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 681e69b2b6..b6055c923d 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -785,6 +785,7 @@ $lang->resource->execution->addWhitelist = 'addWhitelist'; $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; $lang->resource->execution->storyEstimate = 'storyEstimate'; $lang->resource->execution->executionkanban = 'kanbanAction'; +$lang->resource->execution->kanban = 'kanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; //$lang->execution->methodOrder[0] = 'index'; @@ -840,6 +841,7 @@ $lang->execution->methodOrder[250] = 'addWhitelist'; $lang->execution->methodOrder[255] = 'unbindWhitelist'; $lang->execution->methodOrder[260] = 'storyEstimate'; $lang->execution->methodOrder[265] = 'executionkanban'; +$lang->execution->methodOrder[270] = 'kanban'; /* Task. */ $lang->resource->task = new stdclass(); From 64f44170e5c2c04817e6c15b84b3dc1d3e2370bd Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 14 Mar 2022 16:58:34 +0800 Subject: [PATCH 5/6] * Fix bug. --- db/update16.4.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/update16.4.sql b/db/update16.4.sql index acf9d93a8f..d362efa9ed 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -28,22 +28,22 @@ ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`; UPDATE `zt_user` SET `visions`='rnd,lite'; INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '管理员', 'liteUser', '迅捷版用户分组'); +('lite', '管理员', 'liteAdmin', '迅捷版用户分组'); INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '项目管理', 'liteUser', '迅捷版用户分组'); +('lite', '项目管理', 'liteProject', '迅捷版用户分组'); INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '团队成员', 'liteUser', '迅捷版用户分组'); +('lite', '团队成员', 'liteTeam', '迅捷版用户分组'); REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) -SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '管理员' and `vision` = 'lite') from `zt_grouppriv` where `group` = 1; +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteAdmin' and `vision` = 'lite') from `zt_grouppriv` where `group` = 1; REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) -SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '项目管理' and `vision` = 'lite') from `zt_grouppriv` where `group` = 4; +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteProject' and `vision` = 'lite') from `zt_grouppriv` where `group` = 4; REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) -SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '团队成员' and `vision` = 'lite') from `zt_grouppriv` where `group` = 9; +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteTeam' and `vision` = 'lite') from `zt_grouppriv` where `group` = 9; ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`; From 3c25a51bf276647f6e517ded14904ac327bdad9d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 14 Mar 2022 16:59:51 +0800 Subject: [PATCH 6/6] * Fix bug #20738. --- module/group/lang/resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index b6055c923d..4c9e654c9a 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -785,7 +785,7 @@ $lang->resource->execution->addWhitelist = 'addWhitelist'; $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; $lang->resource->execution->storyEstimate = 'storyEstimate'; $lang->resource->execution->executionkanban = 'kanbanAction'; -$lang->resource->execution->kanban = 'kanban'; +$lang->resource->execution->kanban = 'RDKanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; //$lang->execution->methodOrder[0] = 'index';