From 58a4b55e2f7e6ee4a6687640b39697f5e1ccf3ab Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 1 Nov 2022 11:28:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=A4=84=E7=90=86Jira=E6=A8=A1=E6=9D=BF=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=AD=97=E6=AE=B5=E9=A1=B9=E7=9B=AE=E9=9B=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017197 --user=宋昌昌 【测试跟踪】github #17764,MS和Jira集成已经成功,在MS中创建缺陷,拉取的Jira缺陷模板,少一个自定义字段【项目集】,其他的自定义字段都可以拉取到。 https://www.tapd.cn/55049933/s/1284634 --- .../service/issue/platform/JiraPlatform.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java index 72217cd3ec..5c41ff60f4 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java @@ -442,21 +442,17 @@ public class JiraPlatform extends AbstractIssuePlatform { if (ObjectUtils.isNotEmpty(item.getValue())) { if (StringUtils.isNotBlank(item.getType())) { if (StringUtils.equalsAny(item.getType(), "select", "radio", "member")) { - if (StringUtils.equalsAnyIgnoreCase(name, "PML", "PMLinkTest", "PMLink")) { - fields.put(fieldName, item.getValue()); - } else { - Map param = new LinkedHashMap<>(); - if (fieldName.equals("assignee") || fieldName.equals("reporter")) { - if (issuesRequest.isThirdPartPlatform()) { - param.put("id", item.getValue()); - } else { - param.put("name", item.getValue()); - } - } else { + Map param = new LinkedHashMap<>(); + if (fieldName.equals("assignee") || fieldName.equals("reporter")) { + if (issuesRequest.isThirdPartPlatform()) { param.put("id", item.getValue()); + } else { + param.put("name", item.getValue()); } - fields.put(fieldName, param); + } else { + param.put("id", item.getValue()); } + fields.put(fieldName, param); } else if (StringUtils.equalsAny(item.getType(), "multipleSelect", "checkbox", "multipleMember")) { List attrs = new ArrayList(); if (item.getValue() != null) { @@ -762,6 +758,8 @@ public class JiraPlatform extends AbstractIssuePlatform { value = CustomFieldType.MULTIPLE_SELECT.getValue(); } else if (customType.contains("version")) { value = CustomFieldType.SELECT.getValue(); + } else if (customType.contains("customfieldtypes") && StringUtils.equals(schema.getType(), "project")) { + value = CustomFieldType.SELECT.getValue(); } } else { // 系统字段