fix(测试跟踪): 多选导入用例时责任人id忽略大小写

--bug=1015896 --user=张勇 【测试跟踪】用户id是小写,导入用例时责任人id填写大写,导入失败 https://www.tapd.cn/55049933/s/1229922
This commit is contained in:
zhangyong 2022-08-23 10:29:27 +08:00 committed by zhangyongfit2cloud
parent 4354f86c5e
commit 291d16943c
2 changed files with 6 additions and 3 deletions

View File

@ -32,7 +32,8 @@ public class CustomFieldMemberValidator extends AbstractCustomFieldValidator {
if (StringUtils.isBlank(value)) {
return;
}
if (userIdMap.containsKey(value) || userNameMap.containsKey(value)) {
long count = userIdMap.entrySet().stream().filter(e -> StringUtils.equalsAnyIgnoreCase(value,e.getKey(),e.getValue())).count();
if(count > 0){
return;
}
throw new CustomFieldValidateException(String.format(Translator.get("custom_field_member_tip"), customField.getName()));

View File

@ -18,10 +18,12 @@ public class CustomFieldMultipleMemberValidator extends CustomFieldMemberValidat
}
for (String item : parse2Array(customField.getName(), value)) {
if (!userIdMap.containsKey(item) && !userNameMap.containsKey(item)) {
CustomFieldValidateException.throwException(String.format(Translator.get("custom_field_member_tip"), customField.getName()));
long count = userIdMap.entrySet().stream().filter(e -> StringUtils.equalsAnyIgnoreCase(item,e.getKey(),e.getValue())).count();
if(count > 0){
return;
}
}
CustomFieldValidateException.throwException(String.format(Translator.get("custom_field_member_tip"), customField.getName()));
}
@Override