fix(测试跟踪): 功能用例导入无法填账号名称

--bug=1016463 --user=陈建星 【测试跟踪】github#17570,用例导出excel修改之后在导入会提示[责任人]必须当前项目成员,发现导入需要把责任人改成ID https://www.tapd.cn/55049933/s/1236015
This commit is contained in:
AnAngle 2022-09-06 16:16:53 +08:00 committed by f2c-ci-robot[bot]
parent c3bf7bd29b
commit 047ba8a6f3
2 changed files with 4 additions and 5 deletions

View File

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

View File

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