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