fix(工作台):修复工作台我的待办中功能用例统计有误问题
--bug=1024013 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001024013
This commit is contained in:
parent
4bbcc9bf2e
commit
281d52b821
|
@ -422,7 +422,8 @@
|
|||
from test_case
|
||||
left join (select id,workspace_id,NAME from project where workspace_id =#{request.workspaceId})
|
||||
project on test_case.project_id = project.id
|
||||
where test_case.STATUS != 'Trash' and test_case.case_public = true GROUP BY ref_id)
|
||||
where test_case.case_public = true and (test_case.status != 'Trash' or test_case.status is null) GROUP BY
|
||||
ref_id)
|
||||
tmp on test_case.update_time = tmp.update_time and test_case.ref_id = tmp.ref_id
|
||||
<where>
|
||||
<if test="request.combine != null">
|
||||
|
@ -555,8 +556,10 @@
|
|||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
<when test="key=='last_execute_result'">
|
||||
and test_case.last_execute_result in
|
||||
and (test_case.last_execute_result in
|
||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/>
|
||||
or test_case.last_execute_result is null)
|
||||
|
||||
</when>
|
||||
<when test="key=='status'">
|
||||
and test_case.status in
|
||||
|
@ -601,12 +604,12 @@
|
|||
</choose>
|
||||
</if>
|
||||
<if test="key=='status' and (values == null || values.size() == 0)">
|
||||
and test_case.status != 'Trash'
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.filters == null || request.filters.size() == 0 || !request.filters.containsKey('status')">
|
||||
and test_case.status != 'Trash'
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
@ -806,7 +809,7 @@
|
|||
SELECT test_case.priority as groupField, count(id) AS countNumber
|
||||
FROM test_case
|
||||
WHERE project_id = #{projectId}
|
||||
AND test_case.status != 'Trash'
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
and latest = true
|
||||
GROUP BY test_case.priority
|
||||
</select>
|
||||
|
@ -815,7 +818,8 @@
|
|||
SELECT count(DISTINCT ref_id) AS countNumber
|
||||
FROM test_case
|
||||
WHERE test_case.project_id = #{projectId}
|
||||
and test_case.status != 'Trash' and latest = 1
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
and latest = 1
|
||||
AND create_time BETWEEN #{firstDayTimestamp}
|
||||
AND #{lastDayTimestamp}
|
||||
</select>
|
||||
|
@ -823,7 +827,8 @@
|
|||
SELECT review_status AS groupField, count(id) AS countNumber
|
||||
FROM test_case
|
||||
WHERE project_id = #{projectId}
|
||||
and test_case.status != 'Trash' and latest = 1
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
and latest = 1
|
||||
GROUP BY test_case.review_status
|
||||
</select>
|
||||
|
||||
|
@ -857,7 +862,7 @@
|
|||
ON test_case.id = test_case_test.test_case_id
|
||||
WHERE
|
||||
test_case.project_id = #{projectId}
|
||||
AND test_case.STATUS != 'Trash'
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
AND latest = 1
|
||||
GROUP BY
|
||||
test_case_test.test_type
|
||||
|
@ -867,7 +872,8 @@
|
|||
FROM test_case
|
||||
join test_case_test on test_case.id = test_case_test.test_case_id
|
||||
WHERE test_case.project_id = #{projectId}
|
||||
and test_case.status != 'Trash' and latest = 1
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
and latest = 1
|
||||
AND test_case_test.create_time BETWEEN #{firstDayTimestamp}
|
||||
AND #{lastDayTimestamp}
|
||||
</select>
|
||||
|
@ -876,12 +882,13 @@
|
|||
select count(test_case.id)
|
||||
from test_case
|
||||
where test_case.project_id = #{projectId}
|
||||
and test_case.status != 'Trash' and latest = 1
|
||||
and (test_case.status != 'Trash' or test_case.status is null) and latest = 1
|
||||
and test_case.id in (
|
||||
SELECT test_case_id FROM test_case_test WHERE test_type = 'testCase' and test_id IN (select id FROM
|
||||
api_test_case WHERE `STATUS` is null or status != 'Trash')
|
||||
UNION
|
||||
SELECT test_case_id FROM test_case_test WHERE test_type = 'performance' and test_id IN (select id from load_test)
|
||||
SELECT test_case_id FROM test_case_test WHERE test_type = 'performance' and test_id IN (select id from
|
||||
load_test)
|
||||
UNION
|
||||
SELECT test_case_id FROM test_case_test WHERE test_type = 'automation' and test_id IN (select id FROM
|
||||
api_scenario WHERE `STATUS` != 'Trash')
|
||||
|
@ -1009,7 +1016,7 @@
|
|||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
and test_case.status != 'Trash'
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectRelateIdsByQuery" resultType="java.lang.String">
|
||||
|
@ -1100,7 +1107,7 @@
|
|||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
and test_case.status != 'Trash';
|
||||
and (test_case.status != 'Trash' or test_case.status is null);
|
||||
</select>
|
||||
<select id="countByIds" resultType="java.lang.Integer">
|
||||
select count(id)
|
||||
|
@ -1109,7 +1116,7 @@
|
|||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
and test_case.status != 'Trash';
|
||||
and (test_case.status != 'Trash' or test_case.status is null);
|
||||
</select>
|
||||
|
||||
<update id="deleteToGc">
|
||||
|
@ -1185,7 +1192,7 @@
|
|||
from project
|
||||
where workspace_id = #{workSpaceId})
|
||||
and case_public = true
|
||||
and test_case.status != 'Trash'
|
||||
and (test_case.status != 'Trash' or test_case.status is null)
|
||||
</select>
|
||||
|
||||
<select id="trashCount" resultType="java.lang.Long">
|
||||
|
|
|
@ -371,9 +371,9 @@ export default {
|
|||
}
|
||||
} else {
|
||||
if (this.condition.filters) {
|
||||
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
|
||||
this.condition.filters.review_status = ["Prepare", "Pass", "UnPass"];
|
||||
} else {
|
||||
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
|
||||
this.condition.filters = {review_status: ["Prepare", "Pass", "UnPass"]};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -390,9 +390,9 @@ export default {
|
|||
activated() {
|
||||
this.getTemplateField();
|
||||
if (this.condition.filters) {
|
||||
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
|
||||
this.condition.filters.review_status = ["Prepare", "Pass", "UnPass"];
|
||||
} else {
|
||||
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
|
||||
this.condition.filters = {review_status: ["Prepare", "Pass", "UnPass"]};
|
||||
}
|
||||
let ids = this.$route.params.ids;
|
||||
if (ids) {
|
||||
|
@ -594,7 +594,7 @@ export default {
|
|||
this.condition.selectThisWeedData = false;
|
||||
this.condition.selectThisWeedRelevanceData = false;
|
||||
this.condition.caseCoverage = null;
|
||||
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
|
||||
this.condition.filters.review_status = ["Prepare", "Pass", "UnPass"];
|
||||
switch (this.selectDataRange) {
|
||||
case 'thisWeekCount':
|
||||
this.condition.selectThisWeedData = true;
|
||||
|
|
Loading…
Reference in New Issue