From e9b4ff2c8094558f07c57d8d1e19c56a00092cc5 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 28 Feb 2024 18:36:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E7=BC=BA=E9=99=B7=E7=9B=B8=E5=85=B3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/bug/service/BugService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java index c37d4b8256..aebf44126d 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java @@ -533,7 +533,7 @@ public class BugService { public void syncPlatformBugs(List remainBugs, Project project, String currentUser) { try { // 分页同步 - SubListUtils.dealForSubList(remainBugs, 500, (subBugs) -> doSyncPlatformBugs(subBugs, project)); + SubListUtils.dealForSubList(remainBugs, 100, (subBugs) -> doSyncPlatformBugs(subBugs, project)); } catch (Exception e) { LogUtils.error(e); // 同步缺陷异常, 当前同步错误信息 -> Redis(check接口获取) @@ -616,6 +616,9 @@ public class BugService { customEditRequest.setId(updateBug.getId()); customEditRequest.setProjectId(project.getId()); List platformCustomFields = updateBug.getCustomFieldList(); + if (CollectionUtils.isEmpty(platformCustomFields)) { + return; + } List bugCustomFieldDTOList = platformCustomFields.stream().map(platformField -> { BugCustomFieldDTO bugCustomFieldDTO = new BugCustomFieldDTO(); bugCustomFieldDTO.setId(platformField.getId());