fix: 1.14修复 测试计划筛选 关联缺陷

This commit is contained in:
guoyuqi 2021-11-05 13:47:21 +08:00 committed by 刘瑞斌
parent 940c4463b3
commit 6e36a6d13f
3 changed files with 16 additions and 7 deletions

View File

@ -7,6 +7,10 @@
from issues from issues
inner join test_case_issues inner join test_case_issues
on test_case_issues.issues_id = issues.id on test_case_issues.issues_id = issues.id
<if test="request.projectId != null||request.workspaceId != null">
left join
project on issues.project_id = project.id
</if>
<include refid="queryWhereCondition"/> <include refid="queryWhereCondition"/>
and (issues.platform_status != 'delete' or issues.platform_status is NULL) and (issues.platform_status != 'delete' or issues.platform_status is NULL)
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
@ -42,6 +46,10 @@
from issues from issues
left join left join
test_case_issues on issues.id = test_case_issues.issues_id test_case_issues on issues.id = test_case_issues.issues_id
<if test="request.projectId != null||request.workspaceId != null">
left join
project on issues.project_id = project.id
</if>
<include refid="queryWhereCondition"/> <include refid="queryWhereCondition"/>
and (test_case_issues.test_case_id is null or test_case_issues.test_case_id != #{request.caseId}) and (test_case_issues.test_case_id is null or test_case_issues.test_case_id != #{request.caseId})
and (issues.platform_status != 'delete' or issues.platform_status is NULL) and (issues.platform_status != 'delete' or issues.platform_status is NULL)

View File

@ -176,18 +176,17 @@
</foreach> </foreach>
</otherwise> </otherwise>
</choose> </choose>
<if test="request.byFilter == true">
and test_plan.status in
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</if>
</when> </when>
</choose> </choose>
</if> </if>
</foreach> </foreach>
</if> </if>
<if test="request.byFilter == true">
and test_plan.status in
<foreach collection="request.filterStatus" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</if>
</where> </where>
<if test="request.orders != null and request.orders.size() > 0"> <if test="request.orders != null and request.orders.size() > 0">

View File

@ -41,4 +41,6 @@ public class QueryTestPlanRequest extends TestPlan {
* 是否通过筛选条件查询这个字段针对我的工作台-页面列表上的筛选做特殊处理 * 是否通过筛选条件查询这个字段针对我的工作台-页面列表上的筛选做特殊处理
*/ */
private boolean byFilter; private boolean byFilter;
private List<String> filterStatus;
} }