fix(用例管理): 导入数据类型处理
--bug=1035892 --user=王旭 【用例管理】导入用例时更新了用例,用例评审结果没有变为重新提审 https://www.tapd.cn/55049933/s/1464128
This commit is contained in:
parent
150a5bf1fe
commit
d8d40f1a6d
|
@ -7,6 +7,7 @@ import io.metersphere.sdk.util.Translator;
|
|||
import io.metersphere.system.dto.sdk.TemplateCustomFieldDTO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -32,7 +33,7 @@ public class CustomFieldMultipleMemberValidator extends CustomFieldMemberValidat
|
|||
@Override
|
||||
public Object parse2Key(String keyOrValuesStr, TemplateCustomFieldDTO customField) {
|
||||
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||
return StringUtils.EMPTY;
|
||||
return JSON.toJSONString(new ArrayList<>());
|
||||
}
|
||||
List<String> keyOrValues = parse2Array(keyOrValuesStr);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.sdk.util.Translator;
|
|||
import io.metersphere.system.dto.sdk.TemplateCustomFieldDTO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -35,7 +36,7 @@ public class CustomFieldMultipleSelectValidator extends CustomFieldSelectValidat
|
|||
@Override
|
||||
public Object parse2Key(String keyOrValuesStr, TemplateCustomFieldDTO customField) {
|
||||
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||
return StringUtils.EMPTY;
|
||||
return JSON.toJSONString(new ArrayList<>());
|
||||
}
|
||||
List<String> keyOrValues = parse2Array(keyOrValuesStr);
|
||||
Map<String, String> nameMap = optionTextMapCache.get(customField.getFieldId());
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.sdk.util.Translator;
|
|||
import io.metersphere.system.dto.sdk.TemplateCustomFieldDTO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -33,7 +34,7 @@ public class CustomFieldMultipleTextValidator extends AbstractCustomFieldValidat
|
|||
@Override
|
||||
public Object parse2Key(String keyOrValuesStr, TemplateCustomFieldDTO customField) {
|
||||
if (StringUtils.isBlank(keyOrValuesStr)) {
|
||||
return StringUtils.EMPTY;
|
||||
return JSON.toJSONString(new ArrayList<>());
|
||||
}
|
||||
List<String> keyOrValues = parse2Array(keyOrValuesStr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue