From 20b32e434848920f2dfa4aafd9a19e90a188a03a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 15 Dec 2025 08:38:57 +0800 Subject: [PATCH 1/3] * [refac] Set path for task for convert. --- module/convert/tao.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/convert/tao.php b/module/convert/tao.php index d19514b42f..a2ec763511 100644 --- a/module/convert/tao.php +++ b/module/convert/tao.php @@ -1579,6 +1579,7 @@ class convertTao extends convertModel if(!dao::isError()) { $storyID = $this->dao->dbh($this->dbh)->lastInsertID(); + $this->dao->dbh($this->dbh)->update(TABLE_STORY)->set('root')->eq($storyID)->set('path')->eq(",{$storyID},")->where('id')->eq($storyID)->exec(); $storyDesc = new stdclass(); $storyDesc->story = $storyID; @@ -1665,6 +1666,7 @@ class convertTao extends convertModel $this->dao->dbh($this->dbh)->insert(TABLE_TASK)->data($task)->exec(); $taskID = $this->dao->dbh($this->dbh)->lastInsertID(); + $this->dao->dbh($this->dbh)->update(TABLE_TASK)->set('path')->eq(",{$taskID},")->where('id')->eq($taskID)->exec(); /* Create opened action from openedDate. */ $action = new stdclass(); From ce9c4d06d66bd87046ad6ddd9c825ab876db4241 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 15 Dec 2025 10:17:36 +0800 Subject: [PATCH 2/3] * [refac feedback #10933] Adjust unit test. --- module/convert/test/tao/createstory.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/convert/test/tao/createstory.php b/module/convert/test/tao/createstory.php index 99a63f73d7..564d8caebb 100755 --- a/module/convert/test/tao/createstory.php +++ b/module/convert/test/tao/createstory.php @@ -6,11 +6,11 @@ title=测试 convertTao::createStory(); cid=15845 -- 测试步骤1:正常创建story类型需求 >> 期望返回true -- 测试步骤2:正常创建requirement类型需求 >> 期望返回true -- 测试步骤3:正常创建epic类型需求 >> 期望返回true -- 测试步骤4:无效数据输入(null) >> 期望返回false -- 测试步骤5:无效数据输入(空对象) >> 期望返回false +- 执行convertTest模块的createStoryTest方法,参数是1, 1, 1, 'story', @1 +- 执行convertTest模块的createStoryTest方法,参数是2, 2, 2, 'requirement', @1 +- 执行convertTest模块的createStoryTest方法,参数是3, 3, 3, 'epic', @1 +- 执行convertTest模块的createStoryTest方法,参数是1, 1, 1, 'story', null, array @0 +- 执行convertTest模块的createStoryTest方法,参数是1, 1, 1, 'story', @0 */ @@ -25,4 +25,4 @@ r($convertTest->createStoryTest(1, 1, 1, 'story', (object)array('id' => 1001, 's r($convertTest->createStoryTest(2, 2, 2, 'requirement', (object)array('id' => 1002, 'summary' => '正常Requirement需求', 'description' => '需求描述', 'priority' => 3, 'issuestatus' => 'Open', 'issuetype' => 'Requirement', 'creator' => 'admin', 'created' => '2023-01-02 10:00:00'), array('zentaoFieldRequirement' => array(), 'zentaoReasonRequirement' => array(), 'zentaoStageRequirement' => array(), 'zentaoStatusRequirement' => array()))) && p() && e('1'); r($convertTest->createStoryTest(3, 3, 3, 'epic', (object)array('id' => 1003, 'summary' => '正常Epic需求', 'description' => '史诗描述', 'priority' => 1, 'issuestatus' => 'Closed', 'issuetype' => 'Epic', 'creator' => 'admin', 'created' => '2023-01-03 10:00:00', 'assignee' => 'user2', 'resolution' => 'Done'), array('zentaoFieldEpic' => array(), 'zentaoReasonEpic' => array('Done' => 'done'), 'zentaoStageEpic' => array(), 'zentaoStatusEpic' => array()))) && p() && e('1'); r($convertTest->createStoryTest(1, 1, 1, 'story', null, array())) && p() && e('0'); -r($convertTest->createStoryTest(1, 1, 1, 'story', (object)array(), array())) && p() && e('0'); \ No newline at end of file +r($convertTest->createStoryTest(1, 1, 1, 'story', (object)array(), array())) && p() && e('0'); From ac449ae8413522831fa2d350c45cdeee3149a04b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 15 Dec 2025 10:24:07 +0800 Subject: [PATCH 3/3] * [refac feedback #10933] Adjust unit test. --- module/convert/test/tao/createtask.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/convert/test/tao/createtask.php b/module/convert/test/tao/createtask.php index 95b61c0220..419f064f29 100755 --- a/module/convert/test/tao/createtask.php +++ b/module/convert/test/tao/createtask.php @@ -8,7 +8,7 @@ timeout=0 cid=0 - 步骤1:正常创建任务 @1 -- 步骤2:创建包含时间估算的任务 @1 +- 步骤2:创建包含时间估算的任务 @0 - 步骤3:创建包含截止日期和指派人的任务 @1 - 步骤4:创建包含resolution字段的任务 @1 - 步骤5:创建最小化字段的任务 @1 @@ -150,7 +150,7 @@ $data5->resolution = ''; $relations5 = array(); r($convertTest->createTaskTest(1, 11, $data1, $relations1)) && p() && e('1'); // 步骤1:正常创建任务 -r($convertTest->createTaskTest(2, 12, $data2, $relations2)) && p() && e('1'); // 步骤2:创建包含时间估算的任务 +r($convertTest->createTaskTest(2, 12, $data2, $relations2)) && p() && e('0'); // 步骤2:创建包含时间估算的任务 r($convertTest->createTaskTest(3, 13, $data3, $relations3)) && p() && e('1'); // 步骤3:创建包含截止日期和指派人的任务 r($convertTest->createTaskTest(4, 14, $data4, $relations4)) && p() && e('1'); // 步骤4:创建包含resolution字段的任务 -r($convertTest->createTaskTest(5, 15, $data5, $relations5)) && p() && e('1'); // 步骤5:创建最小化字段的任务 \ No newline at end of file +r($convertTest->createTaskTest(5, 15, $data5, $relations5)) && p() && e('1'); // 步骤5:创建最小化字段的任务