fix(测试跟踪): 首页缺陷统计中用例数统计错误
--bug=1010392 --user=陈建星 【测试跟踪】-首页遗留缺陷统计的测试计划用例数错误,是所有测试计划的用例,不是该测试计划中用例数 https://www.tapd.cn/55049933/s/1106885
This commit is contained in:
parent
a43dc028e6
commit
0506d4e5ea
|
@ -19,4 +19,6 @@ public class IssuesDao extends IssuesWithBLOBs {
|
|||
private List<String> tapdUsers;
|
||||
private List<String>zentaoBuilds;
|
||||
private String zentaoAssigned;
|
||||
private String refType;
|
||||
private String refId;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getIssueForMinder" resultType="io.metersphere.base.domain.IssuesDao">
|
||||
select issues.id, issues.title , issues.num , test_case_issues.resource_id as caseId
|
||||
select issues.id, issues.title , issues.num , test_case_issues.resource_id, test_case_issues.ref_id, test_case_issues.ref_type
|
||||
from issues
|
||||
inner join test_case_issues
|
||||
on test_case_issues.issues_id = issues.id
|
||||
|
|
|
@ -1925,12 +1925,18 @@ public class TestCaseService {
|
|||
if (CollectionUtils.isNotEmpty(caseIds)) {
|
||||
List<IssuesDao> issues = extIssuesMapper.getIssueForMinder(caseIds, refType);
|
||||
for (IssuesDao item : issues) {
|
||||
List<IssuesDao> list = issueMap.get(item.getCaseId());
|
||||
String key;
|
||||
if (item.getRefType().equals(IssueRefType.PLAN_FUNCTIONAL.name())) {
|
||||
key = item.getRefId();
|
||||
} else {
|
||||
key = item.getResourceId();
|
||||
}
|
||||
List<IssuesDao> list = issueMap.get(key);
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
list.add(item);
|
||||
issueMap.put(item.getCaseId(), list);
|
||||
issueMap.put(key, list);
|
||||
}
|
||||
}
|
||||
return issueMap;
|
||||
|
|
Loading…
Reference in New Issue