fix(测试跟踪): 同步Jira缺陷后台报错

--bug=1018285 --user=陈建星 【测试跟踪】集成jira缺陷模板后同步缺陷后台日志报空指针 https://www.tapd.cn/55049933/s/1265409
This commit is contained in:
chenjianxing 2022-10-18 11:54:39 +08:00 committed by jianxing
parent 0e754aa3a1
commit 564a94be1e
1 changed files with 3 additions and 0 deletions

View File

@ -915,6 +915,9 @@ public class JiraPlatform extends AbstractIssuePlatform {
&& !msAttachmentsName.contains(filename)) {
try {
byte[] content = jiraClientV2.getAttachmentContent(attachment.get("content").toString());
if (content == null) {
continue;
}
FileAttachmentMetadata fileAttachmentMetadata = attachmentService.saveAttachmentByBytes(content, AttachmentType.ISSUE.type(), issue.getId(), filename);
AttachmentModuleRelation attachmentModuleRelation = new AttachmentModuleRelation();
attachmentModuleRelation.setAttachmentId(fileAttachmentMetadata.getId());