fix(测试跟踪): 测试计划功能用例状态显示有误
--bug=1027305 --user=陈建星 【测试跟踪】批量修改功能用例状态后关联进测试计划,用例状态还是批量操作之前的状态 https://www.tapd.cn/55049933/s/1386007
This commit is contained in:
parent
ecec39cd05
commit
aefea087de
|
@ -298,7 +298,9 @@
|
|||
test_case.node_path, test_case.method,
|
||||
test_case.num, test_case.custom_num,
|
||||
test_case.project_id,
|
||||
test_plan_test_case.executor, test_plan_test_case.status,
|
||||
test_plan_test_case.executor,
|
||||
test_plan_test_case.status as status,
|
||||
test_case.status as caseStatus,
|
||||
test_plan_test_case.actual_result,
|
||||
test_plan_test_case.update_time, test_plan_test_case.create_time,
|
||||
test_plan_test_case.issues_count as issuesCount,
|
||||
|
|
|
@ -27,6 +27,7 @@ public class TestPlanCaseDTO extends TestCaseWithBLOBs {
|
|||
private int issuesCount;
|
||||
private String versionName;
|
||||
private String creatorName;
|
||||
private String caseStatus;
|
||||
|
||||
private List<io.metersphere.dto.TestCaseTestDTO> list;
|
||||
private List<IssuesDao> issueList;
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
:value="getCustomFieldValue(scope.row, field)" :priority-options="priorityOptions"/>
|
||||
</span>
|
||||
<span v-else-if="field.name === '用例状态'">
|
||||
{{ getCustomFieldValue(scope.row, field, scope.row.status) }}
|
||||
{{ getCustomFieldValue(scope.row, field, scope.row.caseStatus) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ getCustomFieldValue(scope.row, field) }}
|
||||
|
@ -329,7 +329,7 @@ import TestPlanCaseIssueItem from "@/business/plan/view/comonents/functional/Tes
|
|||
import {
|
||||
getProjectMemberOption,
|
||||
getProjectVersions,
|
||||
getAdvSearchCustomField, parseTag
|
||||
getAdvSearchCustomField, parseTag, getCustomFieldValueForTrack
|
||||
} from "@/business/utils/sdk-utils";
|
||||
import {
|
||||
testPlanTestCaseBatchDelete,
|
||||
|
@ -615,7 +615,7 @@ export default {
|
|||
return getCustomFieldFilter(field, this.userFilters);
|
||||
},
|
||||
getCustomFieldValue(row, field, defaultVal = '') {
|
||||
let value = _getCustomFieldValue(row, field, this.members);
|
||||
let value = getCustomFieldValueForTrack(row, field, this.members, 'caseStatus');
|
||||
if (field.name === '用例等级') {
|
||||
return row.priority;
|
||||
} else if (field.name === '责任人') {
|
||||
|
|
|
@ -28,20 +28,20 @@ import {
|
|||
} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import i18n from "@/i18n";
|
||||
|
||||
export function getCustomFieldValueForTrack(row, field, members) {
|
||||
export function getCustomFieldValueForTrack(row, field, members, statusProp = 'status') {
|
||||
if (field.name === '用例状态' && field.system) {
|
||||
return parseStatus(row, field.options);
|
||||
return parseStatus(row, field.options, statusProp);
|
||||
}
|
||||
return getCustomFieldValue(row, field, members);
|
||||
}
|
||||
|
||||
function parseStatus(row, options) {
|
||||
function parseStatus(row, options, prop = 'status') {
|
||||
if (options) {
|
||||
for (let option of options) {
|
||||
if (option.value === row.status) {
|
||||
if (option.value === row[prop]) {
|
||||
return option.system ? i18n.t(option.text) : option.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
return row.status;
|
||||
return row[prop];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue