From 16bd64307cb52a73089eff46b107f6ae11103448 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 21 Jun 2024 17:51:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=88=90=E5=8A=9F&&=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=A0=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1042822 --user=宋昌昌 【测试计划】执行测试成功/失败-无法收到消息通知 https://www.tapd.cn/55049933/s/1533817 --- .../java/io/metersphere/plan/service/TestPlanReportService.java | 1 + .../io/metersphere/plan/service/TestPlanSendNoticeService.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java index 697220a4c1..81fb37140b 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java @@ -308,6 +308,7 @@ public class TestPlanReportService { report.setDeleted(false); report.setPassThreshold(config == null ? null : config.getPassThreshold()); report.setParentId(genParam.getGroupReportId()); + report.setTestPlanName(genParam.getTestPlanName()); testPlanReportMapper.insertSelective(report); TestPlanReportDetailCaseDTO reportCaseDetail; diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanSendNoticeService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanSendNoticeService.java index f1843bbbea..6c5e9b228c 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanSendNoticeService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanSendNoticeService.java @@ -196,7 +196,7 @@ public class TestPlanSendNoticeService { paramMap.put("Language", user.getLanguage()); NoticeModel noticeModel = NoticeModel.builder().operator(currentUser).excludeSelf(false) .context(template).subject(subject).paramMap(paramMap).event(StringUtils.equals(executeResult, ReportStatus.SUCCESS.name()) ? - NoticeConstants.TemplateText.TEST_PLAN_TASK_EXECUTE_SUCCESSFUL : NoticeConstants.TemplateText.TEST_PLAN_TASK_EXECUTE_FAILED).build(); + NoticeConstants.Event.EXECUTE_SUCCESSFUL : NoticeConstants.Event.EXECUTE_FAIL).build(); noticeSendService.send(NoticeConstants.TaskType.TEST_PLAN_TASK, noticeModel); } }