fix(缺陷管理): 同步缺陷相关问题修复

This commit is contained in:
song-cc-rock 2024-02-28 18:36:16 +08:00 committed by Craftsman
parent 1e6e480259
commit e9b4ff2c80
1 changed files with 4 additions and 1 deletions

View File

@ -533,7 +533,7 @@ public class BugService {
public void syncPlatformBugs(List<Bug> remainBugs, Project project, String currentUser) { public void syncPlatformBugs(List<Bug> remainBugs, Project project, String currentUser) {
try { try {
// 分页同步 // 分页同步
SubListUtils.dealForSubList(remainBugs, 500, (subBugs) -> doSyncPlatformBugs(subBugs, project)); SubListUtils.dealForSubList(remainBugs, 100, (subBugs) -> doSyncPlatformBugs(subBugs, project));
} catch (Exception e) { } catch (Exception e) {
LogUtils.error(e); LogUtils.error(e);
// 同步缺陷异常, 当前同步错误信息 -> Redis(check接口获取) // 同步缺陷异常, 当前同步错误信息 -> Redis(check接口获取)
@ -616,6 +616,9 @@ public class BugService {
customEditRequest.setId(updateBug.getId()); customEditRequest.setId(updateBug.getId());
customEditRequest.setProjectId(project.getId()); customEditRequest.setProjectId(project.getId());
List<PlatformCustomFieldItemDTO> platformCustomFields = updateBug.getCustomFieldList(); List<PlatformCustomFieldItemDTO> platformCustomFields = updateBug.getCustomFieldList();
if (CollectionUtils.isEmpty(platformCustomFields)) {
return;
}
List<BugCustomFieldDTO> bugCustomFieldDTOList = platformCustomFields.stream().map(platformField -> { List<BugCustomFieldDTO> bugCustomFieldDTOList = platformCustomFields.stream().map(platformField -> {
BugCustomFieldDTO bugCustomFieldDTO = new BugCustomFieldDTO(); BugCustomFieldDTO bugCustomFieldDTO = new BugCustomFieldDTO();
bugCustomFieldDTO.setId(platformField.getId()); bugCustomFieldDTO.setId(platformField.getId());