From 8924707989573ca9dfba124e0bf22ab138e7dddc Mon Sep 17 00:00:00 2001 From: metersphere-bot <78466014+metersphere-bot@users.noreply.github.com> Date: Fri, 2 Jul 2021 17:24:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20jira=E6=8F=90=E4=BA=A4=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E9=9D=9E=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20(#4354)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: chenjianxing --- .../io/metersphere/track/issue/JiraPlatform.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java index 1966be1082..fbf40ab2b9 100644 --- a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java @@ -217,13 +217,15 @@ public class JiraPlatform extends AbstractIssuePlatform { customFields.forEach(item -> { if (StringUtils.isNotBlank(item.getCustomData())) { - if (StringUtils.isNotBlank(item.getType()) && - StringUtils.equalsAny(item.getType(), "select", "multipleSelect", "checkbox", "radio", "member", "multipleMember")) { - JSONObject param = new JSONObject(); - param.put("id", item.getValue()); - fields.put(item.getCustomData(), param); - } else { - fields.put(item.getCustomData(), item.getValue()); + if (StringUtils.isNotBlank(item.getValue())) { + if (StringUtils.isNotBlank(item.getType()) && + StringUtils.equalsAny(item.getType(), "select", "multipleSelect", "checkbox", "radio", "member", "multipleMember")) { + JSONObject param = new JSONObject(); + param.put("id", item.getValue()); + fields.put(item.getCustomData(), param); + } else { + fields.put(item.getCustomData(), item.getValue()); + } } } });