fix(测试跟踪): 功能用例导入报错
--bug=1016072 --user=陈建星 【测试跟踪】导入更新用例失败 https://www.tapd.cn/55049933/s/1229233
This commit is contained in:
parent
d349ad134e
commit
7e08350a95
|
@ -196,7 +196,7 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
|
|||
ExcelErrData excelErrData = new ExcelErrData(testCaseExcelData, rowIndex,
|
||||
Translator.get("number")
|
||||
.concat(" ")
|
||||
.concat(rowIndex.toString()).concat(" ")
|
||||
.concat(String.valueOf(rowIndex + 1)).concat(" ")
|
||||
.concat(Translator.get("row"))
|
||||
.concat(Translator.get("error"))
|
||||
.concat(":")
|
||||
|
|
|
@ -26,6 +26,9 @@ public class CustomFieldMultipleMemberValidator extends CustomFieldMemberValidat
|
|||
|
||||
@Override
|
||||
public String parse2Key(String keyOrValuesStr, CustomFieldDao customField) {
|
||||
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||
return "";
|
||||
}
|
||||
List<String> keyOrValues = JSONArray.parseArray(keyOrValuesStr, String.class);
|
||||
|
||||
for (int i = 0; i < keyOrValues.size(); i++) {
|
||||
|
|
|
@ -18,6 +18,7 @@ public class CustomFieldMultipleSelectValidator extends CustomFieldSelectValidat
|
|||
if (StringUtils.isBlank(value)) {
|
||||
return;
|
||||
}
|
||||
prepareCatch(customField);
|
||||
Set<String> idSet = optionValueSetCache.get(customField.getId());
|
||||
Set<String> textSet = optionTextSetCache.get(customField.getId());
|
||||
for (String item : parse2Array(customField.getName(), value)) {
|
||||
|
@ -29,6 +30,9 @@ public class CustomFieldMultipleSelectValidator extends CustomFieldSelectValidat
|
|||
|
||||
@Override
|
||||
public String parse2Key(String keyOrValuesStr, CustomFieldDao customField) {
|
||||
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||
return "";
|
||||
}
|
||||
List<String> keyOrValues = JSONArray.parseArray(keyOrValuesStr, String.class);
|
||||
Map<String, String> nameMap = optionTextMapCache.get(customField.getId());
|
||||
for (int i = 0; i < keyOrValues.size(); i++) {
|
||||
|
|
|
@ -68,7 +68,7 @@ public class CustomFieldSelectValidator extends AbstractCustomFieldValidator {
|
|||
*
|
||||
* @param customField
|
||||
*/
|
||||
private void prepareCatch(CustomFieldDao customField) {
|
||||
protected void prepareCatch(CustomFieldDao customField) {
|
||||
if (optionValueSetCache.get(customField.getId()) == null) {
|
||||
List<CustomFieldOption> options = getOptions(customField.getId(), customField.getOptions());
|
||||
|
||||
|
|
Loading…
Reference in New Issue