refactor(用例管理): 功能用例列表增加是否有关联用例的筛选条件

This commit is contained in:
guoyuqi 2024-11-29 14:56:59 +08:00 committed by Craftsman
parent 8dc9e2b022
commit 6d9a581da6
3 changed files with 21 additions and 2 deletions

View File

@ -4,7 +4,7 @@ functional_case.hasReview=已评审
functional_case.unReview=未评审
functional_case.passRate=通过率
functional_case.hasPass=已通过
functional_case.unPass=通过
functional_case.unPass=通过
functional_case.associateRate=关联率
functional_case.hasAssociate=已关联
functional_case.unAssociate=未关联

View File

@ -4,7 +4,7 @@ functional_case.hasReview=已评审
functional_case.unReview=未评审
functional_case.passRate=通过率
functional_case.hasPass=已通过
functional_case.unPass=通过
functional_case.unPass=通过
functional_case.associateRate=关联率
functional_case.hasAssociate=已关联
functional_case.unAssociate=未关联

View File

@ -275,6 +275,25 @@
and functional_case.delete_user in
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
</when>
<!-- 关联用例的 -->
<when test="key=='associateCase'">
<if test="values.contains('true')">
and functional_case.id in (
select
distinct fct.case_id
from functional_case_test fct
LEFT JOIN functional_case fc ON fc.id = fct.case_id
where fc.deleted = false )
</if>
<if test="values.contains('false')">
and functional_case.id not in (
select
distinct fct.case_id
from functional_case_test fct
LEFT JOIN functional_case fc ON fc.id = fct.case_id
where fc.deleted = false )
</if>
</when>
</choose>
</if>
</foreach>