fix(测试跟踪): 功能用例列表用例状态的筛选问题

--bug=1016347 --user=宋昌昌 【测试跟踪】github #17449,测试跟踪>>功能测试>>用例列表:列表头中【用例状态=“已完成”】,查找的结果信息不正确 https://www.tapd.cn/55049933/s/1235172
This commit is contained in:
song-cc-rock 2022-08-29 16:36:41 +08:00 committed by f2c-ci-robot[bot]
parent 3cb557f7ee
commit 8e00b7b7f1
3 changed files with 17 additions and 2 deletions

View File

@ -197,7 +197,6 @@ public class TestCaseService {
request.setCustomNum(request.getNum().toString());
}
request.setReviewStatus(TestCaseReviewStatus.Prepare.name());
request.setStatus(TestCaseReviewStatus.Prepare.name());
request.setDemandId(request.getDemandId());
request.setDemandName(request.getDemandName());
request.setCreateUser(SessionUtils.getUserId());
@ -759,7 +758,6 @@ public class TestCaseService {
LogUtil.error("Parse case exec status error:" + e.getMessage());
}
}
data.setStatus(dataStatus);
}
}
return returnList;

View File

@ -691,6 +691,9 @@ export default {
return value;
},
getCustomFieldFilter(field) {
if (field.options) {
return field.options;
}
if (field.name === '用例等级') {
return this.priorityFilters;
} else if (field.name === '用例状态') {

View File

@ -430,6 +430,17 @@ export function saveCustomTableWidth(key, fieldKey, colWith) {
localStorage.setItem(key + '_WITH', JSON.stringify(fields));
}
function parseStatus(row, options) {
if (options) {
for (let option of options) {
if (option.value === row.status) {
return option.system ? i18n.t(option.text) : option.text;
}
}
}
return row.status;
}
/**
* 获取列表的自定义字段的显示值
* @param row
@ -438,6 +449,9 @@ export function saveCustomTableWidth(key, fieldKey, colWith) {
* @returns {VueI18n.TranslateResult|*}
*/
export function getCustomFieldValue(row, field, members) {
if (field.name === '用例状态' && field.system) {
return parseStatus(row, field.options);
}
if (row.customFields) {
for (let i = 0; i < row.customFields.length; i++) {
let item = row.customFields[i];