From a974dafb810df7cbeb2cd517b35275e403143f2f Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 11 Apr 2022 16:00:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E5=8E=BB=E6=8E=89=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=BB=93=E5=B0=BE=E7=9A=84=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1011993 --user=李玉号 [缺陷管理]github #12367 对接禅道企业版,缺陷模板中自定义字段的末尾如果有空隔,会导致此自定义字段无法传递给禅道 https://www.tapd.cn/55049933/s/1132501 --- .../io/metersphere/track/issue/AbstractIssuePlatform.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java b/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java index add224b9e7..4ecb8d51e5 100644 --- a/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java @@ -399,7 +399,11 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform { List customFields = CustomFieldService.getCustomFields(issuesRequest.getCustomFields()); customFields.forEach(item -> { if (StringUtils.isNotBlank(item.getCustomData())) { - paramMap.add(item.getCustomData(), item.getValue()); + if (item.getValue() instanceof String) { + paramMap.add(item.getCustomData(), ((String) item.getValue()).trim()); + } else { + paramMap.add(item.getCustomData(), item.getValue()); + } } }); }