diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java index 3bc8ef51ce..fed64c668e 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java @@ -6,7 +6,6 @@ import io.metersphere.api.dto.RunningParamKeys; import io.metersphere.api.dto.definition.request.ParameterConfig; import io.metersphere.api.dto.scenario.environment.EnvironmentConfig; import io.metersphere.api.dto.shell.filter.ScriptFilter; -import io.metersphere.commons.utils.SessionUtils; import io.metersphere.plugin.core.MsParameter; import io.metersphere.plugin.core.MsTestElement; import lombok.Data; @@ -88,7 +87,6 @@ public class MsJSR223PostProcessor extends MsTestElement { processor.setProperty("scriptLanguage", "rhino"); } processor.setProperty("script", this.getScript()); - processor.setProperty("projectId", StringUtils.isNotEmpty(this.getProjectId()) ? this.getProjectId() : SessionUtils.getCurrentProjectId()); final HashTree jsr223PostTree = tree.add(processor); if (CollectionUtils.isNotEmpty(hashTree)) { hashTree.forEach(el -> { diff --git a/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java b/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java index 8be24b716c..91b0bc03d8 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java @@ -157,7 +157,7 @@ public class ApiExecutionQueueService { queue.setRetryEnable(config.isRetryEnable()); queue.setRetryNumber(config.getRetryNum()); queue.setProjectIds(JSON.toJSONString(new ArrayList<>() {{ - runMap.get(k).getProjectId(); + this.add(runMap.get(k).getProjectId()); }})); queueDetails.add(queue); detailMap.put(k, queue.getId());