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,
|
ExcelErrData excelErrData = new ExcelErrData(testCaseExcelData, rowIndex,
|
||||||
Translator.get("number")
|
Translator.get("number")
|
||||||
.concat(" ")
|
.concat(" ")
|
||||||
.concat(rowIndex.toString()).concat(" ")
|
.concat(String.valueOf(rowIndex + 1)).concat(" ")
|
||||||
.concat(Translator.get("row"))
|
.concat(Translator.get("row"))
|
||||||
.concat(Translator.get("error"))
|
.concat(Translator.get("error"))
|
||||||
.concat(":")
|
.concat(":")
|
||||||
|
|
|
@ -26,6 +26,9 @@ public class CustomFieldMultipleMemberValidator extends CustomFieldMemberValidat
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String parse2Key(String keyOrValuesStr, CustomFieldDao customField) {
|
public String parse2Key(String keyOrValuesStr, CustomFieldDao customField) {
|
||||||
|
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
List<String> keyOrValues = JSONArray.parseArray(keyOrValuesStr, String.class);
|
List<String> keyOrValues = JSONArray.parseArray(keyOrValuesStr, String.class);
|
||||||
|
|
||||||
for (int i = 0; i < keyOrValues.size(); i++) {
|
for (int i = 0; i < keyOrValues.size(); i++) {
|
||||||
|
|
|
@ -18,6 +18,7 @@ public class CustomFieldMultipleSelectValidator extends CustomFieldSelectValidat
|
||||||
if (StringUtils.isBlank(value)) {
|
if (StringUtils.isBlank(value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
prepareCatch(customField);
|
||||||
Set<String> idSet = optionValueSetCache.get(customField.getId());
|
Set<String> idSet = optionValueSetCache.get(customField.getId());
|
||||||
Set<String> textSet = optionTextSetCache.get(customField.getId());
|
Set<String> textSet = optionTextSetCache.get(customField.getId());
|
||||||
for (String item : parse2Array(customField.getName(), value)) {
|
for (String item : parse2Array(customField.getName(), value)) {
|
||||||
|
@ -29,6 +30,9 @@ public class CustomFieldMultipleSelectValidator extends CustomFieldSelectValidat
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String parse2Key(String keyOrValuesStr, CustomFieldDao customField) {
|
public String parse2Key(String keyOrValuesStr, CustomFieldDao customField) {
|
||||||
|
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
List<String> keyOrValues = JSONArray.parseArray(keyOrValuesStr, String.class);
|
List<String> keyOrValues = JSONArray.parseArray(keyOrValuesStr, String.class);
|
||||||
Map<String, String> nameMap = optionTextMapCache.get(customField.getId());
|
Map<String, String> nameMap = optionTextMapCache.get(customField.getId());
|
||||||
for (int i = 0; i < keyOrValues.size(); i++) {
|
for (int i = 0; i < keyOrValues.size(); i++) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class CustomFieldSelectValidator extends AbstractCustomFieldValidator {
|
||||||
*
|
*
|
||||||
* @param customField
|
* @param customField
|
||||||
*/
|
*/
|
||||||
private void prepareCatch(CustomFieldDao customField) {
|
protected void prepareCatch(CustomFieldDao customField) {
|
||||||
if (optionValueSetCache.get(customField.getId()) == null) {
|
if (optionValueSetCache.get(customField.getId()) == null) {
|
||||||
List<CustomFieldOption> options = getOptions(customField.getId(), customField.getOptions());
|
List<CustomFieldOption> options = getOptions(customField.getId(), customField.getOptions());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue