diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
index 2a5136537d..3ebbaf71a0 100644
--- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
+++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
@@ -422,7 +422,8 @@
from test_case
left join (select id,workspace_id,NAME from project where workspace_id =#{request.workspaceId})
project on test_case.project_id = project.id
- where test_case.STATUS != 'Trash' and test_case.case_public = true GROUP BY ref_id)
+ where test_case.case_public = true and (test_case.status != 'Trash' or test_case.status is null) GROUP BY
+ ref_id)
tmp on test_case.update_time = tmp.update_time and test_case.ref_id = tmp.ref_id
@@ -555,8 +556,10 @@
- and test_case.last_execute_result in
+ and (test_case.last_execute_result in
+ or test_case.last_execute_result is null)
+
and test_case.status in
@@ -601,12 +604,12 @@
- and test_case.status != 'Trash'
+ and (test_case.status != 'Trash' or test_case.status is null)
- and test_case.status != 'Trash'
+ and (test_case.status != 'Trash' or test_case.status is null)
@@ -806,7 +809,7 @@
SELECT test_case.priority as groupField, count(id) AS countNumber
FROM test_case
WHERE project_id = #{projectId}
- AND test_case.status != 'Trash'
+ and (test_case.status != 'Trash' or test_case.status is null)
and latest = true
GROUP BY test_case.priority
@@ -815,15 +818,17 @@
SELECT count(DISTINCT ref_id) AS countNumber
FROM test_case
WHERE test_case.project_id = #{projectId}
- and test_case.status != 'Trash' and latest = 1
+ and (test_case.status != 'Trash' or test_case.status is null)
+ and latest = 1
AND create_time BETWEEN #{firstDayTimestamp}
- AND #{lastDayTimestamp}
+ AND #{lastDayTimestamp}
@@ -853,39 +858,41 @@
and test_id IN (select id FROM ui_scenario WHERE `STATUS` != 'Trash')
)
- test_case_test
+ test_case_test
ON test_case.id = test_case_test.test_case_id
WHERE
- test_case.project_id = #{projectId}
- AND test_case.STATUS != 'Trash'
- AND latest = 1
+ test_case.project_id = #{projectId}
+ and (test_case.status != 'Trash' or test_case.status is null)
+ AND latest = 1
GROUP BY
- test_case_test.test_type
+ test_case_test.test_type
@@ -1185,7 +1192,7 @@
from project
where workspace_id = #{workSpaceId})
and case_public = true
- and test_case.status != 'Trash'
+ and (test_case.status != 'Trash' or test_case.status is null)