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 {