fix(测试跟踪): 【测试跟踪】提交缺陷到jira,缺陷内容包含多选类型的自定义字段,高级搜索,不属于该字段,筛选无效

【【测试跟踪】提交缺陷到jira,缺陷内容包含多选类型的自定义字段,高级搜索,不属于该字段,筛选无效】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001016175
This commit is contained in:
zhangyong 2022-08-23 18:47:46 +08:00 committed by zhangyongfit2cloud
parent ee63f0d6b5
commit 87a5eef432
2 changed files with 16 additions and 2 deletions

View File

@ -302,8 +302,15 @@
select resource_id from custom_field_issues where field_id = #{custom.id} select resource_id from custom_field_issues where field_id = #{custom.id}
<choose> <choose>
<when test="custom.type == 'multipleMember' or custom.type == 'checkbox' or custom.type == 'multipleSelect'"> <when test="custom.type == 'multipleMember' or custom.type == 'checkbox' or custom.type == 'multipleSelect'">
<choose>
<when test="custom.operator == 'in'">
and JSON_CONTAINS(`value`, #{custom.value}) and JSON_CONTAINS(`value`, #{custom.value})
</when> </when>
<otherwise>
and NOT JSON_CONTAINS(`value`, #{custom.value})
</otherwise>
</choose>
</when>
<when test="custom.type == 'date' or custom.type == 'datetime'"> <when test="custom.type == 'date' or custom.type == 'datetime'">
and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13) and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13)
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition"> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">

View File

@ -112,8 +112,15 @@
select resource_id from custom_field_test_case where field_id = #{custom.id} select resource_id from custom_field_test_case where field_id = #{custom.id}
<choose> <choose>
<when test="custom.type == 'multipleMember' or custom.type == 'checkbox' or custom.type == 'multipleSelect'"> <when test="custom.type == 'multipleMember' or custom.type == 'checkbox' or custom.type == 'multipleSelect'">
<choose>
<when test="custom.operator == 'in'">
and JSON_CONTAINS(`value`, #{custom.value}) and JSON_CONTAINS(`value`, #{custom.value})
</when> </when>
<otherwise>
and NOT JSON_CONTAINS(`value`, #{custom.value})
</otherwise>
</choose>
</when>
<when test="custom.type == 'date' or custom.type == 'datetime'"> <when test="custom.type == 'date' or custom.type == 'datetime'">
and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13) and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13)
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition"> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">