fix(测试跟踪):首页测试计划遗留缺陷统计跳转至缺陷列表未显示关闭状态的缺陷数据
--bug=1026332 --user=王旭 【测试跟踪】项目集成local-首页-测试计划遗留缺陷统计-点击本周新增-跳转页面未显示关闭状态的缺陷 https://www.tapd.cn/55049933/s/1373259
This commit is contained in:
parent
6b84b0f672
commit
8c728e250b
|
@ -1936,32 +1936,7 @@ public class IssuesService {
|
|||
} else {
|
||||
issueIds = Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
Map<String, String> statusMap = customFieldIssuesService.getIssueStatusMap(issueIds, request.getProjectId());
|
||||
if (MapUtils.isEmpty(statusMap) && CollectionUtils.isNotEmpty(issueIds)) {
|
||||
// 未找到自定义字段状态, 则获取平台状态
|
||||
IssuesRequest issuesRequest = new IssuesRequest();
|
||||
issuesRequest.setProjectId(SessionUtils.getCurrentProjectId());
|
||||
issuesRequest.setFilterIds(issueIds);
|
||||
List<IssuesDao> issues = extIssuesMapper.getIssues(issuesRequest);
|
||||
statusMap = issues.stream().collect(Collectors.toMap(IssuesDao::getId, i -> Optional.ofNullable(i.getPlatformStatus()).orElse("new")));
|
||||
}
|
||||
|
||||
if (MapUtils.isEmpty(statusMap)) {
|
||||
request.setFilterIds(issueIds);
|
||||
} else {
|
||||
if (request.getThisWeekUnClosedTestPlanIssue() || request.getUnClosedTestPlanIssue()) {
|
||||
CustomField customField = baseCustomFieldService.getCustomFieldByName(SessionUtils.getCurrentProjectId(), SystemCustomField.ISSUE_STATUS);
|
||||
JSONArray statusArray = JSONArray.parseArray(customField.getOptions());
|
||||
Map<String, String> tmpStatusMap = statusMap;
|
||||
List<String> unClosedIds = issueIds.stream()
|
||||
.filter(id -> !StringUtils.equals(tmpStatusMap.getOrDefault(id, StringUtils.EMPTY).replaceAll("\"", StringUtils.EMPTY), "closed"))
|
||||
.collect(Collectors.toList());
|
||||
request.setFilterIds(unClosedIds);
|
||||
} else {
|
||||
request.setFilterIds(issueIds);
|
||||
}
|
||||
}
|
||||
request.setFilterIds(issueIds);
|
||||
}
|
||||
|
||||
public boolean thirdPartTemplateEnable(String projectId) {
|
||||
|
|
Loading…
Reference in New Issue