diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index b597433159..641fc10bff 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -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; diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index dd2ffa76f8..86c73cf93e 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -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 === '用例状态') { diff --git a/frontend/src/common/js/tableUtils.js b/frontend/src/common/js/tableUtils.js index 78499221fc..c240c08279 100644 --- a/frontend/src/common/js/tableUtils.js +++ b/frontend/src/common/js/tableUtils.js @@ -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];