fix(测试跟踪): 功能用例导入部分校验失效

--bug=1013066 --user=陈建星 【测试跟踪】github#13306未按模版填写的用例 ,导入后,切换到脑图 全部展开会保错 https://www.tapd.cn/55049933/s/1155474
This commit is contained in:
chenjianxing 2022-05-11 10:54:42 +08:00 committed by f2c-ci-robot[bot]
parent 8658f1a240
commit bff34acf8b
2 changed files with 4 additions and 2 deletions

View File

@ -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<Map<Integ
}
private TestCaseExcelData parseDataToModel(Map<Integer, String> row) {
TestCaseExcelData data = new TestCaseExcelData();
TestCaseExcelData data = new TestCaseExcelDataFactory().getTestCaseExcelDataLocal();
for (Map.Entry<Integer,String> headEntry: headMap.entrySet()) {
Integer index = headEntry.getKey();
String field = headEntry.getValue();

View File

@ -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());
}