fix(测试跟踪): 缺陷导入自定义字段单选类型添加格式校验

--bug=1025891 --user=宋昌昌 【测试跟踪】缺陷管理上传文件严重程度字段一个缺陷可上传多个严重程度 https://www.tapd.cn/55049933/s/1367434
This commit is contained in:
song-cc-rock 2023-04-27 10:49:41 +08:00 committed by fit2-zhao
parent cf1b35ee0d
commit e857b30222
1 changed files with 5 additions and 0 deletions

View File

@ -413,6 +413,11 @@ public class IssueExcelListener extends AnalysisEventListener<Map<Integer, Strin
Integer.parseInt(value);
} else if (StringUtils.equalsAnyIgnoreCase(type, CustomFieldType.FLOAT.getValue())) {
Float.parseFloat(value);
} else if (StringUtils.equalsAnyIgnoreCase(type, CustomFieldType.SELECT.getValue())) {
Object val = JSON.parseObject(value);
if (val instanceof ArrayList<?>) {
return Boolean.TRUE;
}
}
return Boolean.FALSE;
} catch (Exception e) {