From 247a04b089696c9adc5e2aa2886743c451868630 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 1 Nov 2022 15:54:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=81=97=E7=95=99=E7=BC=BA=E9=99=B7=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=80=BB=E6=95=B0=E5=92=8C=E5=8D=A0=E6=AF=94=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017609 --user=李玉号 【测试跟踪】首页遗留缺陷统计总数和占比有统计错误 https://www.tapd.cn/55049933/s/1285282 --- .../base/mapper/ext/ExtTestCaseMapper.xml | 9 ++++- .../io/metersphere/service/TrackService.java | 39 ++++++++++++++----- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 6350b2cc9c..2611c3458a 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -890,7 +890,14 @@ join issues on tci.issues_id = issues.id where tptc.plan_id = #{planId} - and test_case.status != 'Trash'; + and test_case.status != 'Trash' + union distinct + select distinct tci.issues_id + from test_plan_test_case tptc + join test_case_issues tci on tptc.id = tci.resource_id + join issues + on tci.issues_id = issues.id + where tptc.plan_id = #{planId}