fix(测试跟踪): Jira没勾选第三方模板,提交缺陷图片不显示

--bug=1017001 --user=陈建星 【测试跟踪】缺陷管理-提交缺陷到jira平台-图片不显示 https://www.tapd.cn/55049933/s/1250464
This commit is contained in:
chenjianxing 2022-09-15 18:56:53 +08:00 committed by jianxing
parent eb71bfd61e
commit 0d7b97cbc1
1 changed files with 4 additions and 3 deletions

View File

@ -360,8 +360,8 @@ public class JiraPlatform extends AbstractIssuePlatform {
} else { } else {
fields.put("summary", issuesRequest.getTitle()); fields.put("summary", issuesRequest.getTitle());
fields.put("description", desc); fields.put("description", desc);
issuesRequest.getRequestFields().add(getRichTextCustomField("description")); // 添加后解析图片会用到
issuesRequest.getRequestFields().add(getRichTextCustomField("summary")); issuesRequest.getRequestFields().add(getRichTextCustomField("description", desc));
parseCustomFiled(issuesRequest, fields); parseCustomFiled(issuesRequest, fields);
} }
setSpecialParam(fields); setSpecialParam(fields);
@ -369,11 +369,12 @@ public class JiraPlatform extends AbstractIssuePlatform {
return addJiraIssueParam; return addJiraIssueParam;
} }
private CustomFieldItemDTO getRichTextCustomField(String name) { private CustomFieldItemDTO getRichTextCustomField(String name, String value) {
CustomFieldItemDTO customField = new CustomFieldItemDTO(); CustomFieldItemDTO customField = new CustomFieldItemDTO();
customField.setId(name); customField.setId(name);
customField.setType(CustomFieldType.RICH_TEXT.getValue()); customField.setType(CustomFieldType.RICH_TEXT.getValue());
customField.setCustomData(name); customField.setCustomData(name);
customField.setValue(value);
return customField; return customField;
} }