From aee26d4961e8746593268933b8898c72cb990795 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Thu, 24 Oct 2024 19:55:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E7=94=A8=E4=BE=8B=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E6=89=A7=E8=A1=8C=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047999 --user=陈建星 【系统设置】系统-任务中心-用例执行任务/用例执行任务详情列表-在测试计划内单独执行用例/场景-任务列表未显示该任务 https://www.tapd.cn/55049933/s/1597730 --- .../io/metersphere/plan/service/TestPlanApiCaseService.java | 5 +++++ .../metersphere/plan/service/TestPlanApiScenarioService.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java index aa76d7a985..bdddf39427 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java @@ -52,6 +52,7 @@ import io.metersphere.system.dto.LogInsertModule; import io.metersphere.system.dto.ModuleSelectDTO; import io.metersphere.system.dto.sdk.BaseTreeNode; import io.metersphere.system.dto.sdk.SessionUser; +import io.metersphere.system.service.BaseTaskHubService; import io.metersphere.system.service.UserLoginService; import io.metersphere.system.uid.IDGenerator; import io.metersphere.system.utils.ServiceUtils; @@ -127,6 +128,8 @@ public class TestPlanApiCaseService extends TestPlanResourceService { private ExtApiTestCaseMapper extApiTestCaseMapper; @Resource private ApiCommonService apiCommonService; + @Resource + private BaseTaskHubService baseTaskHubService; private static final String EXECUTOR = "executeUserName"; @@ -768,6 +771,8 @@ public class TestPlanApiCaseService extends TestPlanResourceService { execTaskItem.setResourceId(apiTestCase.getId()); execTaskItem.setResourceName(apiTestCase.getName()); + baseTaskHubService.insertExecTaskAndDetail(execTask, execTaskItem); + TaskInfo taskInfo = taskRequest.getTaskInfo(); TaskItem taskItem = taskRequest.getTaskItem(); taskInfo.setTaskId(execTask.getId()); diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java index 670da9bf36..fa4d0c7ff8 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java @@ -50,6 +50,7 @@ import io.metersphere.system.dto.LogInsertModule; import io.metersphere.system.dto.ModuleSelectDTO; import io.metersphere.system.dto.sdk.BaseTreeNode; import io.metersphere.system.dto.sdk.SessionUser; +import io.metersphere.system.service.BaseTaskHubService; import io.metersphere.system.service.UserLoginService; import io.metersphere.system.uid.IDGenerator; import io.metersphere.system.utils.ServiceUtils; @@ -117,6 +118,8 @@ public class TestPlanApiScenarioService extends TestPlanResourceService { private TestPlanConfigService testPlanConfigService; @Resource private ApiCommonService apiCommonService; + @Resource + private BaseTaskHubService baseTaskHubService; private static final String EXECUTOR = "executeUserName"; @@ -352,6 +355,8 @@ public class TestPlanApiScenarioService extends TestPlanResourceService { execTaskItem.setResourceId(testPlanApiScenario.getId()); execTaskItem.setResourceName(apiScenario.getName()); + baseTaskHubService.insertExecTaskAndDetail(execTask, execTaskItem); + TaskInfo taskInfo = taskRequest.getTaskInfo(); taskInfo.setTaskId(execTask.getId()); taskInfo.setRunModeConfig(runModeConfig);