From 10fb5fead9850f9dc8716531654781cdd41418e1 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 18 Mar 2024 10:57:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=88=90=E5=91=98=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/FunctionalCaseService.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java index 3d3e8f1da0..e55615af60 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java @@ -470,16 +470,15 @@ public class FunctionalCaseService { customFields.forEach(item -> { if (StringUtils.equalsAnyIgnoreCase(item.getType(), CustomFieldType.MEMBER.name(), CustomFieldType.MULTIPLE_MEMBER.name())) { item.setOptions(memberCustomOption); - } else { - FunctionalCaseCustomField caseCustomField = functionalCaseCustomFieldService.getCustomField(item.getFieldId(), functionalCase.getId()); - Optional.ofNullable(caseCustomField).ifPresentOrElse(customField -> { - item.setDefaultValue(customField.getValue()); - if (Translator.get("custom_field.functional_priority").equals(item.getFieldName())) { - functionalCaseDetailDTO.setFunctionalPriority(customField.getValue()); - } - }, () -> { - }); - } + }; + FunctionalCaseCustomField caseCustomField = functionalCaseCustomFieldService.getCustomField(item.getFieldId(), functionalCase.getId()); + Optional.ofNullable(caseCustomField).ifPresentOrElse(customField -> { + item.setDefaultValue(customField.getValue()); + if (Translator.get("custom_field.functional_priority").equals(item.getFieldName())) { + functionalCaseDetailDTO.setFunctionalPriority(customField.getValue()); + } + }, () -> { + }); }); functionalCaseDetailDTO.setCustomFields(customFields); }