diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index aeec0311c8..f639629980 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -383,6 +383,7 @@ select test_case.remark, test_plan_test_case.id as id, test_plan_test_case.*, + if(pa.type_value = 'false', cast(test_case.num as char), test_case.custom_num) as customNum, test_case.*, test_case_node.name as model, project.name as projectName @@ -390,7 +391,8 @@ inner join test_case on test_plan_test_case.case_id = test_case.id left join test_case_node on test_case_node.id = test_case.node_id inner join project on project.id = test_case.project_id - where test_plan_test_case.id = #{testPlanTestCaseId} + inner join project_application pa on project.id = pa.project_id and pa.type = 'CASE_CUSTOM_NUM' + where test_plan_test_case.id = #{testPlanTestCaseId}