From f5db54fafcadd80468a36bc81f4abeaefb855bde Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Thu, 19 Sep 2024 16:24:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=85=B3=E8=81=94=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E5=88=97=E8=A1=A8=E6=89=B9=E9=87=8F=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1046671 --user=王旭 【测试计划】计划详情-功能/接口/场景用例列表-批量新建缺陷-系统/组织/项目未生成日志 https://www.tapd.cn/55049933/s/1581000 --- .../plan/controller/TestPlanApiCaseController.java | 4 ++++ .../plan/controller/TestPlanApiScenarioController.java | 4 ++++ .../plan/controller/TestPlanFunctionalCaseController.java | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java index 1b39bb4d61..4e05cbdb07 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java @@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.ApiReportDetailDTO; import io.metersphere.api.service.definition.ApiReportService; import io.metersphere.bug.domain.Bug; import io.metersphere.bug.dto.request.BugEditRequest; +import io.metersphere.bug.service.BugLogService; import io.metersphere.bug.service.BugService; import io.metersphere.dto.BugProviderDTO; import io.metersphere.plan.dto.request.*; @@ -58,6 +59,8 @@ public class TestPlanApiCaseController { private ApiReportService apiReportService; @Resource private BugService bugService; + @Resource + private BugLogService bugLogService; @PostMapping(value = "/sort") @Operation(summary = "测试计划功能用例-功能用例拖拽排序") @@ -214,6 +217,7 @@ public class TestPlanApiCaseController { BugEditRequest bugEditRequest = new BugEditRequest(); BeanUtils.copyBean(bugEditRequest, request); Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false); + bugLogService.minderAddLog(bugEditRequest, files, SessionUtils.getCurrentOrganizationId(), bug.getId(), SessionUtils.getUserId()); testPlanApiCaseService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId()); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java index b8c9d03ad6..6f0708a6be 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java @@ -7,6 +7,7 @@ import io.metersphere.api.dto.scenario.ApiScenarioReportDetailDTO; import io.metersphere.api.service.scenario.ApiScenarioReportService; import io.metersphere.bug.domain.Bug; import io.metersphere.bug.dto.request.BugEditRequest; +import io.metersphere.bug.service.BugLogService; import io.metersphere.bug.service.BugService; import io.metersphere.dto.BugProviderDTO; import io.metersphere.plan.dto.request.*; @@ -55,6 +56,8 @@ public class TestPlanApiScenarioController { private ApiScenarioReportService apiScenarioReportService; @Resource private BugService bugService; + @Resource + private BugLogService bugLogService; @PostMapping("/page") @Operation(summary = "测试计划-已关联场景用例列表分页查询") @@ -199,6 +202,7 @@ public class TestPlanApiScenarioController { BugEditRequest bugEditRequest = new BugEditRequest(); BeanUtils.copyBean(bugEditRequest, request); Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false); + bugLogService.minderAddLog(bugEditRequest, files, SessionUtils.getCurrentOrganizationId(), bug.getId(), SessionUtils.getUserId()); testPlanApiScenarioService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId()); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanFunctionalCaseController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanFunctionalCaseController.java index 2300a57d32..62866feee5 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanFunctionalCaseController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanFunctionalCaseController.java @@ -4,6 +4,7 @@ import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.bug.domain.Bug; import io.metersphere.bug.dto.request.BugEditRequest; +import io.metersphere.bug.service.BugLogService; import io.metersphere.bug.service.BugService; import io.metersphere.dto.BugProviderDTO; import io.metersphere.plan.constants.TestPlanResourceConfig; @@ -55,6 +56,8 @@ public class TestPlanFunctionalCaseController { private TestPlanFunctionalCaseService testPlanFunctionalCaseService; @Resource private BugService bugService; + @Resource + private BugLogService bugLogService; @PostMapping(value = "/sort") @Operation(summary = "测试计划功能用例-功能用例拖拽排序") @@ -219,6 +222,7 @@ public class TestPlanFunctionalCaseController { BugEditRequest bugEditRequest = new BugEditRequest(); BeanUtils.copyBean(bugEditRequest, request); Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false); + bugLogService.minderAddLog(bugEditRequest, files, SessionUtils.getCurrentOrganizationId(), bug.getId(), SessionUtils.getUserId()); testPlanFunctionalCaseService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId()); }