From 73fe715c9558a176455295e127a4c88489d17eec Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 25 Nov 2021 12:00:09 +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=E6=8A=A5?= =?UTF-8?q?null=E7=9A=84=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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 568e1d6445..d3b291b354 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -800,9 +800,7 @@ public class ApiTestCaseService { //通过测试计划id查询环境 request.setReportId(request.getTestPlanId()); } - if (StringUtils.equals(request.getRunMode(), ApiRunMode.JENKINS.name())) { - request.setReportId(request.getEnvironmentId()); - } + // 多态JSON普通转换会丢失内容,需要通过 ObjectMapper 获取 if (testCaseWithBLOBs != null && StringUtils.isNotEmpty(testCaseWithBLOBs.getRequest())) { try {