diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java index 23d88b0737..3710d4ab4b 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java @@ -1869,7 +1869,7 @@ public class IssuesService { } public void setFilterIds(IssuesRequest request) { - List issueIds = new ArrayList<>(); + List issueIds; if (request.getThisWeekUnClosedTestPlanIssue()) { issueIds = extIssuesMapper.getTestPlanThisWeekIssue(request.getProjectId()); } else if (request.getAllTestPlanIssue() || request.getUnClosedTestPlanIssue()) { @@ -1898,24 +1898,6 @@ public class IssuesService { List unClosedIds = issueIds.stream() .filter(id -> !StringUtils.equals(tmpStatusMap.getOrDefault(id, StringUtils.EMPTY).replaceAll("\"", StringUtils.EMPTY), "closed")) .collect(Collectors.toList()); - Iterator iterator = unClosedIds.iterator(); - while (iterator.hasNext()) { - String unClosedId = iterator.next(); - String status = statusMap.getOrDefault(unClosedId, StringUtils.EMPTY).replaceAll("\"", StringUtils.EMPTY); - IssueStatus statusEnum = IssueStatus.getEnumByName(status); - if (statusEnum == null) { - boolean exist = false; - for (int i = 0; i < statusArray.size(); i++) { - JSONObject statusObj = (JSONObject) statusArray.get(i); - if (StringUtils.equals(status, statusObj.get("value").toString())) { - exist = true; - } - } - if (!exist) { - iterator.remove(); - } - } - } request.setFilterIds(unClosedIds); } else { request.setFilterIds(issueIds);