fix(项目设置): 用例状态筛选的问题

--bug=1016347 --user=宋昌昌 【测试跟踪】github #17449,测试跟踪>>功能测试>>用例列表:列表头中【用例状态=“已完成”】,查找的结果信息不正确 https://www.tapd.cn/55049933/s/1235719
This commit is contained in:
song-cc-rock 2022-08-30 11:40:44 +08:00 committed by 刘瑞斌
parent d249fffe56
commit 4ce8c0fde8
3 changed files with 9 additions and 1 deletions

View File

@ -2,7 +2,8 @@ package io.metersphere.commons.constants;
public enum CaseCustomFields {
PRIORITY("用例等级"),
MAINTAINER("责任人");
MAINTAINER("责任人"),
STATUS("用例状态");
private String value;

View File

@ -1686,6 +1686,10 @@ public class TestCaseService {
if (StringUtils.equals(request.getCustomField().getName(), CaseCustomFields.MAINTAINER.getValue())) {
testCase.setMaintainer((String) request.getCustomField().getValue());
}
if (StringUtils.equals(request.getCustomField().getName(), CaseCustomFields.STATUS.getValue())) {
testCase.setStatus((String) request.getCustomField().getValue());
}
testCase.setUpdateTime(System.currentTimeMillis());
TestCaseExample example = new TestCaseExample();
example.createCriteria().andIdEqualTo(testCase.getId());

View File

@ -692,6 +692,9 @@ export default {
},
getCustomFieldFilter(field) {
if (field.options) {
field.options.forEach(option => {
option.text = this.$t(option.text)
})
return field.options;
}
if (field.name === '用例等级') {