diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java index 775c04f8b4..230a021414 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java @@ -578,7 +578,11 @@ public class FunctionalCaseMinderService { if (targetIndex > sources.size()) { beforeNode = sources; afterNode = new ArrayList<>(); - } else { + } else if (targetIndex == 0){ + beforeNode = new ArrayList<>(); + afterNode = sources; + } + else { beforeNode = sources.subList(0, targetIndex - 1); afterNode = sources.subList(targetIndex - 1, sources.size()); }