From b606e9187a498882616440fe31b21a0bc6a9017b Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 25 Nov 2021 15:29:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(jenkins):=20=E4=BF=AE=E5=A4=8Djenkins?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/service/ApiTestCaseService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index d3b291b354..f03862c509 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -801,6 +801,11 @@ public class ApiTestCaseService { request.setReportId(request.getTestPlanId()); } + if (StringUtils.equals(request.getRunMode(), ApiRunMode.JENKINS.name())) { + testCaseWithBLOBs = apiTestCaseMapper.selectByPrimaryKey(request.getCaseId()); + request.setReportId(request.getEnvironmentId()); + } + // 多态JSON普通转换会丢失内容,需要通过 ObjectMapper 获取 if (testCaseWithBLOBs != null && StringUtils.isNotEmpty(testCaseWithBLOBs.getRequest())) { try {