fix(接口定义): 修复回收站筛选执行结果失败的缺陷

--bug=1016224 --user=王孝刚 【接口测试】接口定义,回收站,case列表,搜索执行结果是未执行的case,搜索结果是空的
https://www.tapd.cn/55049933/s/1231976
This commit is contained in:
wxg0103 2022-08-24 13:50:58 +08:00 committed by 刘瑞斌
parent 698328ab7f
commit 4f0b2f9880
3 changed files with 5 additions and 9 deletions

View File

@ -289,10 +289,7 @@ public class ApiTestCaseService {
if (updateUser != null) { if (updateUser != null) {
caseResult.setUpdateUser(updateUser.getName()); caseResult.setUpdateUser(updateUser.getName());
} }
//检查用例的执行状态是否是null如果报告被删除 如果执行结果是null取记录最后执行状态的status字段
if (caseResult.getExecResult() == null && StringUtils.isNotEmpty(caseResult.getStatus()) && !StringUtils.equalsIgnoreCase(caseResult.getStatus(), "trash")) {
caseResult.setExecResult(caseResult.getStatus());
}
}); });
} }
} }

View File

@ -473,10 +473,13 @@
</foreach> </foreach>
</when> </when>
<when test="key=='execResult' or key=='exec_result'"> <when test="key=='execResult' or key=='exec_result'">
and t1.STATUS in and (t3.status in
<foreach collection="values" item="value" separator="," open="(" close=")"> <foreach collection="values" item="value" separator="," open="(" close=")">
(#{value}) (#{value})
</foreach> </foreach>
<if test="values.contains(''.toString())">
or t3.status is null
</if>)
</when> </when>
<when test="key=='create_user' or key=='createUser'"> <when test="key=='create_user' or key=='createUser'">
and t1.create_user_id in and t1.create_user_id in

View File

@ -755,10 +755,6 @@ export default {
} }
this.initCondition(); this.initCondition();
let isNext = false; let isNext = false;
//caseprepare
if (this.condition.filters && this.condition.filters.exec_result && this.condition.filters.exec_result.indexOf('') !== -1) {
this.condition.filters.exec_result.push("Prepare")
}
if (this.condition.projectId) { if (this.condition.projectId) {
this.result = this.$post('/api/testcase/list/' + this.currentPage + "/" + this.pageSize, this.condition, response => { this.result = this.$post('/api/testcase/list/' + this.currentPage + "/" + this.pageSize, this.condition, response => {
this.total = response.data.itemCount; this.total = response.data.itemCount;