fix(测试跟踪): 首页遗留缺陷统计错误

--bug=1009822 --user=lyh 【测试跟踪】首页遗留缺陷统计错误
https://www.tapd.cn/55049933/s/1095909
This commit is contained in:
shiziyuan9527 2022-01-21 20:28:28 +08:00 committed by shiziyuan9527
parent 30ec7bd92e
commit 36a13c7256
2 changed files with 20 additions and 7 deletions

View File

@ -247,10 +247,14 @@
SELECT * from project where project.id in (SELECT user_group.source_id from user_group where user_group.user_id = #{userId})
</select>
<select id="getProjectPlanBugSize" resultType="java.lang.Integer">
select count(distinct(tci.issues_id)) from test_plan_test_case tptc
join test_case_issues tci on tptc.case_id = tci.test_case_id
join issues on tci.issues_id = issues.id
join test_plan on tptc.plan_id = test_plan.id
where test_plan.project_id = #{projectId} and (issues.status != 'closed' or issues.status is null);
select count(distinct (tci.issues_id))
from test_plan_test_case tptc
join test_case_issues tci on tptc.case_id = tci.test_case_id
right join test_case on test_case.id = tci.test_case_id
join issues on tci.issues_id = issues.id
join test_plan on tptc.plan_id = test_plan.id
where test_plan.project_id = #{projectId}
and (issues.status != 'closed' or issues.status is null)
and test_case.status != 'Trash';
</select>
</mapper>

View File

@ -702,8 +702,17 @@
group by tc.maintainer
</select>
<select id="getTestPlanBug" resultType="int">
select count(distinct (tci.issues_id)) from test_plan_test_case tptc join test_case_issues tci on tptc.case_id = tci.test_case_id join issues on tci.issues_id = issues.id
where tptc.plan_id = #{planId} and (issues.status != 'closed' or issues.status is null);
select count(distinct (tci.issues_id))
from test_plan_test_case tptc
join test_case_issues tci on tptc.case_id = tci.test_case_id
right join test_case
on test_case.id = tci.test_case_id
join issues
on tci.issues_id = issues.id
where tptc.plan_id = #{planId}
and (issues.status != 'closed'
or issues.status is null)
and test_case.status != 'Trash';
</select>
<select id="getTestPlanCase" resultType="int">
select count(s)