fix(测试跟踪): 测试计划功能用例编辑页,用例状态显示有误
--bug=1027626 --user=陈建星 【测试跟踪】github#25427,测试用例,查看并修改用例状态为 已完成,将该用例加入到测试计划中,点击执行页面的 用例状态还是未开始 https://www.tapd.cn/55049933/s/1391309
This commit is contained in:
parent
0dc84016c5
commit
01a441eb50
|
@ -441,7 +441,8 @@
|
|||
test_plan_test_case.*,
|
||||
test_case.*,
|
||||
test_case_node.name as model,
|
||||
project.name as projectName
|
||||
project.name as projectName,
|
||||
test_case.status as caseStatus
|
||||
from test_plan_test_case
|
||||
inner join test_case on test_plan_test_case.case_id = test_case.id
|
||||
left join test_case_node on test_case_node.id = test_case.node_id
|
||||
|
|
|
@ -133,3 +133,16 @@ export function resetCaseSystemField(customFields, testCase) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function resetPlanCaseSystemField(customFields, testCase) {
|
||||
// 用例等级等字段以表中对应字段为准
|
||||
customFields.forEach((field) => {
|
||||
if (field.name === "用例等级") {
|
||||
field.defaultValue = testCase.priority;
|
||||
} else if (field.name === "责任人") {
|
||||
field.defaultValue = testCase.maintainer;
|
||||
} else if (field.name === "用例状态") {
|
||||
field.defaultValue = testCase.caseStatus;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ import {
|
|||
import { testPlanEditStatus } from "@/api/remote/plan/test-plan";
|
||||
import { getTestTemplate } from "@/api/custom-field-template";
|
||||
import { checkProjectPermission } from "@/api/testCase";
|
||||
import {openCaseEdit, resetCaseSystemField} from "@/business/case/test-case";
|
||||
import {openCaseEdit, resetPlanCaseSystemField} from "@/business/case/test-case";
|
||||
import CustomFieldFormItems from "@/business/common/CustomFieldFormItems";
|
||||
|
||||
export default {
|
||||
|
@ -511,7 +511,7 @@ export default {
|
|||
});
|
||||
},
|
||||
resetSystemField() {
|
||||
resetCaseSystemField(this.testCaseTemplate.customFields, this.testCase);
|
||||
resetPlanCaseSystemField(this.testCaseTemplate.customFields, this.testCase);
|
||||
},
|
||||
openTestCaseEdit(testCase, tableData) {
|
||||
checkProjectPermission(testCase.projectId).then((r) => {
|
||||
|
|
Loading…
Reference in New Issue