fix(测试跟踪): 测试计划功能用例列表自定义字段筛选问题

--bug=1027306 --user=宋昌昌 【测试计划】测试计划 - 功能用例列表,按用例状态筛选,不显示用例 https://www.tapd.cn/55049933/s/1386173
This commit is contained in:
song-cc-rock 2023-06-26 15:59:58 +08:00 committed by 刘瑞斌
parent 5865a8671c
commit c67ae4ddce
2 changed files with 19 additions and 2 deletions

View File

@ -279,6 +279,22 @@
#{value}
</foreach>
</when>
<when test="key.startsWith('custom_single')">
and test_case.id in (
select resource_id from custom_field_test_case where concat('custom_single-',field_id) = #{key}
and trim(both '"' from value) in
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/>
)
</when>
<when test="key.startsWith('custom_multiple')">
and test_case.id in (
select resource_id from custom_field_test_case where concat('custom_multiple-',field_id) = #{key}
and
<foreach collection="values" item="value" separator="or" open="(" close=")">
JSON_CONTAINS(value, #{value})
</foreach>
)
</when>
<otherwise>
and test_plan_test_case.status in
<foreach collection="values" item="value" separator="," open="(" close=")">

View File

@ -236,7 +236,7 @@
<ms-table-column v-for="field in testCaseTemplate.customFields" :key="field.id"
:filters="getCustomFieldFilter(field)"
:field="item"
column-key="priority"
:column-key="field.columnKey ? field.columnKey : generateColumnKey(field)"
:fields-width="fieldsWidth"
:label="field.system ? $t(systemFiledMap[field.name]) :field.name"
:min-width="120"
@ -328,7 +328,7 @@ import TestPlanCaseIssueItem from "@/business/plan/view/comonents/functional/Tes
import {
getProjectMemberOption,
getProjectVersions,
getAdvSearchCustomField, parseTag, getCustomFieldValueForTrack
getAdvSearchCustomField, parseTag, getCustomFieldValueForTrack, generateColumnKey
} from "@/business/utils/sdk-utils";
import {
testPlanTestCaseBatchDelete,
@ -548,6 +548,7 @@ export default {
this.$EventBus.$off("openFailureTestCase", this.handleOpenFailureTestCase);
},
methods: {
generateColumnKey,
loadIssue(row) {
if (row.issuesSize && !row.hasLoadIssue) {
getOriginIssuesByCaseId('PLAN_FUNCTIONAL', row.id)