From d3ec35d26ebedbd5b7f566f13caee825bd1e57f9 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 5 May 2022 11:27:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E4=BD=BF=E7=94=A8=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89ID=EF=BC=8C=E5=9C=A8=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=B8=ADID=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1012977 --user=李玉号 [测试跟踪]github#13229功能用例使用自定义ID,在测试计划中ID错误 https://www.tapd.cn/55049933/s/1152538 Closes #13229 --- .../base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 4 +++- .../view/comonents/functional/FunctionalRelevance.vue | 8 ++++---- .../view/comonents/functional/FunctionalTestCaseEdit.vue | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) 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}