fix(测试跟踪): 首页统计的测试计划本周缺陷问题
--bug=1024695 --user=宋昌昌 【测试跟踪】项目集成JIRA 缺陷平台,测试计划中关联的缺陷在首页未统计 https://www.tapd.cn/55049933/s/1354646
This commit is contained in:
parent
0bef17d0cd
commit
129953fa70
|
@ -1869,7 +1869,7 @@ public class IssuesService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFilterIds(IssuesRequest request) {
|
public void setFilterIds(IssuesRequest request) {
|
||||||
List<String> issueIds = new ArrayList<>();
|
List<String> issueIds;
|
||||||
if (request.getThisWeekUnClosedTestPlanIssue()) {
|
if (request.getThisWeekUnClosedTestPlanIssue()) {
|
||||||
issueIds = extIssuesMapper.getTestPlanThisWeekIssue(request.getProjectId());
|
issueIds = extIssuesMapper.getTestPlanThisWeekIssue(request.getProjectId());
|
||||||
} else if (request.getAllTestPlanIssue() || request.getUnClosedTestPlanIssue()) {
|
} else if (request.getAllTestPlanIssue() || request.getUnClosedTestPlanIssue()) {
|
||||||
|
@ -1898,24 +1898,6 @@ public class IssuesService {
|
||||||
List<String> unClosedIds = issueIds.stream()
|
List<String> unClosedIds = issueIds.stream()
|
||||||
.filter(id -> !StringUtils.equals(tmpStatusMap.getOrDefault(id, StringUtils.EMPTY).replaceAll("\"", StringUtils.EMPTY), "closed"))
|
.filter(id -> !StringUtils.equals(tmpStatusMap.getOrDefault(id, StringUtils.EMPTY).replaceAll("\"", StringUtils.EMPTY), "closed"))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
Iterator<String> 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);
|
request.setFilterIds(unClosedIds);
|
||||||
} else {
|
} else {
|
||||||
request.setFilterIds(issueIds);
|
request.setFilterIds(issueIds);
|
||||||
|
|
Loading…
Reference in New Issue