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 641f2e5b49..15f6549564 100644
--- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java
+++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java
@@ -289,10 +289,7 @@ public class ApiTestCaseService {
if (updateUser != null) {
caseResult.setUpdateUser(updateUser.getName());
}
- //检查用例的执行状态是否是null(如果报告被删除)。 如果执行结果是null,取记录最后执行状态的status字段
- if (caseResult.getExecResult() == null && StringUtils.isNotEmpty(caseResult.getStatus()) && !StringUtils.equalsIgnoreCase(caseResult.getStatus(), "trash")) {
- caseResult.setExecResult(caseResult.getStatus());
- }
+
});
}
}
diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml
index 76989bf38f..e5fcf5316f 100644
--- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml
+++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml
@@ -473,10 +473,13 @@
- and t1.STATUS in
+ and (t3.status in
(#{value})
+
+ or t3.status is null
+ )
and t1.create_user_id in
diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
index 25475dfa77..3ed1426604 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
@@ -755,10 +755,6 @@ export default {
}
this.initCondition();
let isNext = false;
- //导入的case执行结果默认为prepare,导致搜索未执行失败
- if (this.condition.filters && this.condition.filters.exec_result && this.condition.filters.exec_result.indexOf('') !== -1) {
- this.condition.filters.exec_result.push("Prepare")
- }
if (this.condition.projectId) {
this.result = this.$post('/api/testcase/list/' + this.currentPage + "/" + this.pageSize, this.condition, response => {
this.total = response.data.itemCount;