From d8d40f1a6d99b8d87c7d99ac5d75ebac3de986a3 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Thu, 22 Feb 2024 20:01:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1035892 --user=王旭 【用例管理】导入用例时更新了用例,用例评审结果没有变为重新提审 https://www.tapd.cn/55049933/s/1464128 --- .../excel/validate/CustomFieldMultipleMemberValidator.java | 3 ++- .../excel/validate/CustomFieldMultipleSelectValidator.java | 3 ++- .../excel/validate/CustomFieldMultipleTextValidator.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleMemberValidator.java b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleMemberValidator.java index 88dcf9d4d9..e36d1a3b36 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleMemberValidator.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleMemberValidator.java @@ -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 keyOrValues = parse2Array(keyOrValuesStr); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleSelectValidator.java b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleSelectValidator.java index b55d2bf97b..f4b3540457 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleSelectValidator.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleSelectValidator.java @@ -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 keyOrValues = parse2Array(keyOrValuesStr); Map nameMap = optionTextMapCache.get(customField.getFieldId()); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleTextValidator.java b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleTextValidator.java index 833c1535f6..17d573da8b 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleTextValidator.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/validate/CustomFieldMultipleTextValidator.java @@ -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 keyOrValues = parse2Array(keyOrValuesStr);