diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index 144bd2d01a..b046a60963 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -2126,6 +2126,7 @@ public class ApiScenarioService { object.put("referenced", "Copy"); } } else { + //将复制的或者类型不是引用case的步骤赋予当前项目id,目的是为了运行的时候可以配置运行环境 object.put("projectId", projectId); if (StringUtils.isEmpty(object.optString("url"))) { object.put("isRefEnvironment", true); diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index a1d98b1f6c..efd8506cca 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -168,7 +168,7 @@