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 7a5d9e69dc..d1e0824086 100644 --- a/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java @@ -433,7 +433,11 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform { Object value = issue.get(fieldName); if (value != null) { if (value instanceof JSONObject) { - item.setValue(getSyncJsonParamValue(value)); + if (StringUtils.equals(fieldName, "assignee")) { + item.setValue(((JSONObject) value).get("displayName")); + } else { + item.setValue(getSyncJsonParamValue(value)); + } } else if (value instanceof JSONArray) { // Sprint 是单选 同步回来是 JSONArray if (StringUtils.equals(item.getType(), "select")) { 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 442cea1ef7..524031f023 100644 --- a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java @@ -419,21 +419,26 @@ public class JiraPlatform extends AbstractIssuePlatform { customFields.forEach(item -> { String fieldName = item.getCustomData(); + String name = item.getName(); if (StringUtils.isNotBlank(fieldName)) { if (ObjectUtils.isNotEmpty(item.getValue())) { if (StringUtils.isNotBlank(item.getType())) { if (StringUtils.equalsAny(item.getType(), "select", "radio", "member")) { - JSONObject param = new JSONObject(); - if (fieldName.equals("assignee") || fieldName.equals("reporter")) { - if (issuesRequest.isThirdPartPlatform()) { - param.put("id", item.getValue()); - } else { - param.put("name", item.getValue()); - } + if (StringUtils.equalsAnyIgnoreCase(name, "PML", "PMLinkTest", "PMLink")) { + fields.put(fieldName, item.getValue()); } else { - param.put("id", item.getValue()); + JSONObject param = new JSONObject(); + if (fieldName.equals("assignee") || fieldName.equals("reporter")) { + if (issuesRequest.isThirdPartPlatform()) { + param.put("id", item.getValue()); + } else { + param.put("name", item.getValue()); + } + } else { + param.put("id", item.getValue()); + } + fields.put(fieldName, param); } - fields.put(fieldName, param); } else if (StringUtils.equalsAny(item.getType(), "multipleSelect", "checkbox", "multipleMember")) { JSONArray attrs = new JSONArray(); if (item.getValue() != null) {