From 9329374d66362b68f8812381a9c31c7a49f363b9 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 22 Mar 2023 19:18:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BB=9F=E8=AE=A1=E7=9A=84=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=9C=AC=E5=91=A8=E7=BC=BA=E9=99=B7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024695 --user=宋昌昌 【测试跟踪】项目集成JIRA 缺陷平台,测试计划中关联的缺陷在首页未统计 https://www.tapd.cn/55049933/s/1354646 --- .../io/metersphere/service/IssuesService.java | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) 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 190569f5a6..693b53df7a 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 @@ -1871,7 +1871,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()) { @@ -1900,24 +1900,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);