fix(接口测试): 修复删除用例执行报告后用例状态变为未执行的问题 (#11803)

--bug=1011016 --user=宋天阳
【接口测试】github11320,执行接口case成功后,删除该测试报告,接口case执行结果又变成“未执行”,执行结果选择“未执行”筛选不出来,选择“通过”才能筛选出来
https://www.tapd.cn/55049933/s/1123789

Co-authored-by: song-tianyang <tianyang.song@fit2cloud.com>
This commit is contained in:
metersphere-bot 2022-03-22 18:58:59 +08:00 committed by GitHub
parent db2928917c
commit b7845ffa82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,9 @@ public class ApiTestCaseService {
if (environment != null) {
apiCase.setEnvironment(environment.getName());
}
if(apiCase.getExecResult() == null && StringUtils.isNotEmpty(apiCase.getStatus()) && !StringUtils.equalsIgnoreCase(apiCase.getStatus(),"trash")){
apiCase.setExecResult(apiCase.getStatus());
}
}
}

View File

@ -416,6 +416,7 @@ export default {
statusFilters: [
{text: this.$t('api_test.automation.success'), value: 'success'},
{text: this.$t('api_test.automation.fail'), value: 'error'},
{text: this.$t('error_report_library.option.name'), value: 'errorReportResult'},
{text: this.$t('report.stop_btn'), value: 'STOP'},
{text: this.$t('api_test.home_page.detail_card.unexecute'), value: ''},
{text: this.$t('commons.testing'), value: 'Running'}