From 87a5eef4324114fa4b924c9e2ebe5244ab274ee4 Mon Sep 17 00:00:00 2001 From: zhangyong Date: Tue, 23 Aug 2022 18:47:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E3=80=90=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA=E3=80=91=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E7=BC=BA=E9=99=B7=E5=88=B0jira=EF=BC=8C=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E5=86=85=E5=AE=B9=E5=8C=85=E5=90=AB=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E9=AB=98=E7=BA=A7=E6=90=9C=E7=B4=A2=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=B1=9E=E4=BA=8E=E8=AF=A5=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【测试跟踪】提交缺陷到jira,缺陷内容包含多选类型的自定义字段,高级搜索,不属于该字段,筛选无效】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001016175 --- .../io/metersphere/base/mapper/ext/ExtIssuesMapper.xml | 9 ++++++++- .../io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml index 4f146fada3..96a146972c 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml @@ -302,7 +302,14 @@ select resource_id from custom_field_issues where field_id = #{custom.id} - and JSON_CONTAINS(`value`, #{custom.value}) + + + and JSON_CONTAINS(`value`, #{custom.value}) + + + and NOT JSON_CONTAINS(`value`, #{custom.value}) + + and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 9a0093f2fd..aafeff47f6 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -112,7 +112,14 @@ select resource_id from custom_field_test_case where field_id = #{custom.id} - and JSON_CONTAINS(`value`, #{custom.value}) + + + and JSON_CONTAINS(`value`, #{custom.value}) + + + and NOT JSON_CONTAINS(`value`, #{custom.value}) + + and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13)