From 564a94be1e5759204ddde32d2da4502b9a0929ed Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 18 Oct 2022 11:54:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=90=8C=E6=AD=A5Jira=E7=BC=BA=E9=99=B7=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018285 --user=陈建星 【测试跟踪】集成jira缺陷模板后同步缺陷后台日志报空指针 https://www.tapd.cn/55049933/s/1265409 --- .../io/metersphere/service/issue/platform/JiraPlatform.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java index 5f0473af61..5992a8c241 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/JiraPlatform.java @@ -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());