From d22f81334a553995aed56a789419661b4d6721de Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 11 May 2022 10:54:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=AF=BC=E5=85=A5=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=A0=A1=E9=AA=8C=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013066 --user=陈建星 【测试跟踪】github#13306未按模版填写的用例 ,导入后,切换到脑图 全部展开会保错 https://www.tapd.cn/55049933/s/1155474 --- .../excel/listener/TestCaseNoModelDataListener.java | 3 ++- .../java/io/metersphere/track/service/TestCaseService.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java b/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java index 8329b8bef6..7470f4773e 100644 --- a/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java +++ b/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java @@ -14,6 +14,7 @@ import io.metersphere.dto.CustomFieldDao; import io.metersphere.excel.annotation.NotRequired; import io.metersphere.excel.domain.ExcelErrData; import io.metersphere.excel.domain.TestCaseExcelData; +import io.metersphere.excel.domain.TestCaseExcelDataFactory; import io.metersphere.excel.utils.ExcelValidateHelper; import io.metersphere.excel.utils.FunctionCaseImportEnum; import io.metersphere.i18n.Translator; @@ -612,7 +613,7 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener row) { - TestCaseExcelData data = new TestCaseExcelData(); + TestCaseExcelData data = new TestCaseExcelDataFactory().getTestCaseExcelDataLocal(); for (Map.Entry headEntry: headMap.entrySet()) { Integer index = headEntry.getKey(); String field = headEntry.getValue(); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 5b0b30925f..62e5bbdba3 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -476,7 +476,8 @@ public class TestCaseService { criteria.andNameEqualTo(testCase.getName()) .andProjectIdEqualTo(testCase.getProjectId()) .andNodePathEqualTo(nodePath) - .andTypeEqualTo(testCase.getType()); + .andTypeEqualTo(testCase.getType()) + .andStatusNotEqualTo("Trash"); if (StringUtils.isNotBlank(testCase.getPriority())) { criteria.andPriorityEqualTo(testCase.getPriority()); }