fix(测试跟踪): 处理Jira模板自定义字段项目集问题

--bug=1017197 --user=宋昌昌 【测试跟踪】github #17764,MS和Jira集成已经成功,在MS中创建缺陷,拉取的Jira缺陷模板,少一个自定义字段【项目集】,其他的自定义字段都可以拉取到。 https://www.tapd.cn/55049933/s/1284634
This commit is contained in:
song-cc-rock 2022-11-01 11:28:17 +08:00 committed by jianxing
parent 5e0c92f1f6
commit 6d629d4e8c
1 changed files with 10 additions and 12 deletions

View File

@ -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 {
// 系统字段