fix(测试跟踪): 缺陷导入ID重复

--bug=1020773 --user=陈建星 [测试跟踪]#20568缺陷根据模板导入,缺陷ID重复 https://www.tapd.cn/55049933/s/1315841
This commit is contained in:
chenjianxing 2022-12-15 11:53:18 +08:00 committed by jianxing
parent 33fdb9da96
commit a57f24a37a
1 changed files with 5 additions and 4 deletions

View File

@ -173,6 +173,7 @@ public class IssuesService {
issues.setPlatform(project.getPlatform());
insertIssues(issues);
issuesRequest.setId(issues.getId());
issuesRequest.setPlatformId(issues.getPlatformId());
// 用例与第三方缺陷平台中的缺陷关联
handleTestCaseIssues(issuesRequest);
@ -621,13 +622,13 @@ public class IssuesService {
issuesRequest.setProjectId(SessionUtils.getCurrentProjectId());
List<IssuesDao> issuesDaos = listByWorkspaceId(issuesRequest);
if (CollectionUtils.isNotEmpty(issuesDaos)) {
issuesDaos.parallelStream().forEach(issuesDao -> {
issuesDaos.forEach(issuesDao -> {
delete(issuesDao.getId());
});
}
} else {
if (CollectionUtils.isNotEmpty(request.getBatchDeleteIds())) {
request.getBatchDeleteIds().parallelStream().forEach(id -> delete(id));
request.getBatchDeleteIds().forEach(id -> delete(id));
}
}
}
@ -1775,13 +1776,13 @@ public class IssuesService {
}
public void saveImportData(List<IssuesUpdateRequest> issues) {
issues.parallelStream().forEach(issue -> {
issues.forEach(issue -> {
addIssues(issue, null);
});
}
public void updateImportData(List<IssuesUpdateRequest> issues) {
issues.parallelStream().forEach(issue -> {
issues.forEach(issue -> {
updateIssues(issue);
});
}