diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 85656ce75c..484d402252 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -859,6 +859,12 @@ public class ApiDefinitionService { apiTestCaseWithBLOBs.setId(UUID.randomUUID().toString()); apiTestCaseMapper.insert(apiTestCaseWithBLOBs); } + if (StringUtils.isBlank(apiTestCaseWithBLOBs.getStatus())) { + apiTestCaseWithBLOBs.setStatus(APITestStatus.Underway.name()); + } + if (apiTestCaseWithBLOBs.getOrder() == null) { + apiTestCaseWithBLOBs.setOrder(getImportNextCaseOrder(apiDefinition.getProjectId())); + } } }