From aed6b493e00d86a79e1dc40fafc6d9548ba34ad4 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Tue, 26 Apr 2022 16:12:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E8=AF=A6=E6=83=85=E9=87=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=EF=BC=8C=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=EF=BC=8C=E6=B2=A1=E6=8F=90=E7=A4=BA=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 --bug=1011995 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001011995 --- .../api/exec/scenario/ApiScenarioEnvService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java index 0a0847f58b..da8e031240 100644 --- a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java +++ b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java @@ -95,7 +95,8 @@ public class ApiScenarioEnvService { http.setUrl(StringUtils.equals(testElement.getRefType(), "CASE") ? null : http.getUrl()); // 非全路径校验 - if (StringUtils.isBlank(http.getUrl()) || (http.getIsRefEnvironment() != null && http.getIsRefEnvironment())) { + if (!StringUtils.equalsIgnoreCase(http.getReferenced(), "Created") || (http.getIsRefEnvironment() != null && + http.getIsRefEnvironment())) { env.getProjectIds().add(http.getProjectId()); env.setFullUrl(false); } @@ -132,7 +133,8 @@ public class ApiScenarioEnvService { if (StringUtils.equals(testElement.getType(), "HTTPSamplerProxy")) { // 校验是否是全路径 MsHTTPSamplerProxy httpSamplerProxy = (MsHTTPSamplerProxy) testElement; - if (StringUtils.isBlank(httpSamplerProxy.getUrl()) || (httpSamplerProxy.getIsRefEnvironment() != null && httpSamplerProxy.getIsRefEnvironment())) { + if (!StringUtils.equalsIgnoreCase(httpSamplerProxy.getReferenced(), "Created") || (httpSamplerProxy.getIsRefEnvironment() != null && + httpSamplerProxy.getIsRefEnvironment())) { env.getProjectIds().add(httpSamplerProxy.getProjectId()); env.setFullUrl(false); }