From abc0f7b9e249eeac967462f2b9d6f4a7a16b4be9 Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Thu, 19 Dec 2024 17:08:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E9=80=9A=E8=BF=87=E5=92=8C?= =?UTF-8?q?=E6=9C=AA=E9=80=9A=E8=BF=87=E7=9A=84=E6=9F=A5=E8=AF=A2=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/plan/utils/TestPlanUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/utils/TestPlanUtils.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/utils/TestPlanUtils.java index 8064f6b795..51ec341aa6 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/utils/TestPlanUtils.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/utils/TestPlanUtils.java @@ -13,9 +13,10 @@ public class TestPlanUtils { public static Map> parseGroupIdMap(List testPlanList) { Map> testPlanGroupIdMap = new HashMap<>(); for (TestPlan testPlan : testPlanList) { + if (StringUtils.equalsIgnoreCase(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_GROUP) && !testPlanGroupIdMap.containsKey(testPlan.getId())) { testPlanGroupIdMap.put(testPlan.getId(), new ArrayList<>()); - } else { + } else if (StringUtils.equalsIgnoreCase(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_PLAN)) { if (testPlanGroupIdMap.containsKey(testPlan.getGroupId())) { testPlanGroupIdMap.get(testPlan.getGroupId()).add(testPlan.getId()); } else {