From 4e28744647536b1904c12e4397ae4073d421ede4 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Wed, 19 Jun 2024 13:45:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E5=88=97=E8=A1=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/plan/service/TestPlanApiCaseService.java | 2 +- .../metersphere/plan/service/TestPlanFunctionalCaseService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java index 64ce85768d..63a99c0ed3 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java @@ -264,7 +264,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService { item.setProjectName(projectMap.get(item.getProjectId())); item.setCreateUserName(userMap.get(item.getCreateUser())); item.setExecuteUserName(userMap.get(item.getExecuteUser())); - item.setModuleName(moduleNameMap.get(item.getModuleId())); + item.setModuleName(StringUtils.isNotBlank(moduleNameMap.get(item.getModuleId())) ? moduleNameMap.get(item.getModuleId()) : Translator.get("api_unplanned_request")); if (secondEnvMap.containsKey(item.getTestPlanCollectionId())) { TestPlanCollectionEnvDTO collectEnv = secondEnvMap.get(item.getTestPlanCollectionId()); if (collectEnv.getExtended()) { diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java index 0550a5f5b0..70b7581339 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java @@ -252,7 +252,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService { testPlanCasePageResponse.setCustomFields(collect.get(testPlanCasePageResponse.getCaseId())); testPlanCasePageResponse.setCreateUserName(userMap.get(testPlanCasePageResponse.getCreateUser())); testPlanCasePageResponse.setExecuteUserName(userMap.get(testPlanCasePageResponse.getExecuteUser())); - testPlanCasePageResponse.setModuleName(moduleNameMap.get(testPlanCasePageResponse.getModuleId())); + testPlanCasePageResponse.setModuleName(StringUtils.isNotBlank(moduleNameMap.get(testPlanCasePageResponse.getModuleId())) ? moduleNameMap.get(testPlanCasePageResponse.getModuleId()) : Translator.get("functional_case.module.default.name")); if (bugListMap.containsKey(testPlanCasePageResponse.getCaseId())) { List bugDTOList = bugListMap.get(testPlanCasePageResponse.getCaseId()); testPlanCasePageResponse.setBugList(handleStatus(bugDTOList, statusMap));