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 d15f7001cb
commit 3263fe7d1d
1 changed files with 4 additions and 3 deletions

View File

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