From 01a6d23356afaa56d097d8b668d3694e73246a03 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 11 Jan 2023 18:01:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=B8=8D=E8=A6=86=E7=9B=96=E6=A8=A1=E5=BC=8F=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=B2=E5=AD=98=E5=9C=A8=E7=BC=BA=E9=99=B7=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021892 --user=宋昌昌 【测试跟踪】缺陷管理-导入-不覆盖-导入失败,提示不合法的缺陷 https://www.tapd.cn/55049933/s/1326303 --- .../java/io/metersphere/excel/domain/IssueExcelData.java | 2 ++ .../io/metersphere/excel/listener/IssueExcelListener.java | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java index 39e0a607bf..adaa61ee12 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java @@ -48,6 +48,8 @@ public class IssueExcelData implements Serializable { @ExcelIgnore private Boolean addFlag; @ExcelIgnore + private Boolean updateFlag = true; + @ExcelIgnore private String title; @ExcelIgnore private String description; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java b/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java index fab5a5822b..fb8b2105d2 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java @@ -121,6 +121,12 @@ public class IssueExcelListener extends AnalysisEventListener issues = updateList.stream().map(this::convertToIssue).collect(Collectors.toList()); + List issues = updateList.stream().filter(IssueExcelData::getUpdateFlag).map(this::convertToIssue).collect(Collectors.toList()); issuesService.updateImportData(issues); } }