fix(测试跟踪): 功能用例使用自定义ID,在测试计划中ID显示错误

--bug=1012977 --user=李玉号 [测试跟踪]github#13229功能用例使用自定义ID,在测试计划中ID错误
https://www.tapd.cn/55049933/s/1152538

Closes #13229
This commit is contained in:
shiziyuan9527 2022-05-05 11:27:13 +08:00 committed by halo-ci-bot[bot]
parent 2e816595ed
commit d3ec35d26e
3 changed files with 8 additions and 6 deletions

View File

@ -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,6 +391,7 @@
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
inner join project_application pa on project.id = pa.project_id and pa.type = 'CASE_CUSTOM_NUM'
where test_plan_test_case.id = #{testPlanTestCaseId}
</select>

View File

@ -198,7 +198,7 @@ export default {
this.page.condition.projectId = this.projectId;
this.getProjectNode();
this.getTestCases();
this.getProject();
this.getCustomNum();
}
},
methods: {
@ -215,11 +215,11 @@ export default {
setProject(projectId) {
this.projectId = projectId;
},
getProject() {
this.$get("/project/get/" + this.projectId, result => {
getCustomNum() {
this.$get('/project_application/get/config/' + this.projectId + "/CASE_CUSTOM_NUM", result => {
let data = result.data;
if (data) {
this.customNum = data.customNum;
this.customNum = data.caseCustomNum;
}
});
},

View File

@ -46,7 +46,7 @@
<el-row class="head-bar">
<el-col>
<el-divider content-position="left">
<el-button class="test-case-name" type="text" @click="openTestTestCase(testCase)">{{ testCase.num }}-{{ testCase.name }}</el-button>
<el-button class="test-case-name" type="text" @click="openTestTestCase(testCase)">{{ testCase.customNum }}-{{ testCase.name }}</el-button>
</el-divider>
</el-col>
</el-row>