fix: --bug=1006896 --user=陈建星 【github#6406】用例等级没有展示用户定义模板的值 https://www.tapd.cn/55049933/s/1051937

This commit is contained in:
chenjianxing 2021-09-26 15:51:37 +08:00 committed by jianxing
parent fbe43422fd
commit 861cb5e80b
2 changed files with 5 additions and 5 deletions

View File

@ -383,7 +383,7 @@
} }
if (this.type === 'add') { if (this.type === 'add') {
// //
parseCustomField(this.form, this.testCaseTemplate, this.customFieldForm, this.customFieldRules, buildTestCaseOldFields(this.form)); parseCustomField(this.form, this.testCaseTemplate, this.customFieldForm, this.customFieldRules);
this.form.name = this.testCaseTemplate.caseName; this.form.name = this.testCaseTemplate.caseName;
this.form.stepDescription = this.testCaseTemplate.stepDescription; this.form.stepDescription = this.testCaseTemplate.stepDescription;
this.form.expectedResult = this.testCaseTemplate.expectedResult; this.form.expectedResult = this.testCaseTemplate.expectedResult;
@ -504,7 +504,7 @@
this.form.maintainer = user.id; this.form.maintainer = user.id;
this.form.tags = []; this.form.tags = [];
this.getSelectOptions(); this.getSelectOptions();
parseCustomField(this.form, this.testCaseTemplate, this.customFieldForm, this.customFieldRules, buildTestCaseOldFields(this.form)); parseCustomField(this.form, this.testCaseTemplate, this.customFieldForm, this.customFieldRules);
this.reload(); this.reload();
} }
}, },
@ -580,7 +580,7 @@
} }
this.form.module = testCase.nodeId; this.form.module = testCase.nodeId;
// //
parseCustomField(this.form, this.testCaseTemplate, this.customFieldForm, this.customFieldRules, buildTestCaseOldFields(this.form)); parseCustomField(this.form, this.testCaseTemplate, this.customFieldForm, this.customFieldRules, testCase ? buildTestCaseOldFields(this.form) : null);
this.setDefaultValue(); this.setDefaultValue();
// //
this.reloadForm(); this.reloadForm();

View File

@ -72,7 +72,7 @@ import CustomFieldFormList from "@/business/components/settings/workspace/templa
import CustomFieldRelateList from "@/business/components/settings/workspace/template/CustomFieldRelateList"; import CustomFieldRelateList from "@/business/components/settings/workspace/template/CustomFieldRelateList";
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem"; import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants"; import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
import {buildCustomFields, getTemplate, parseCustomField} from "@/common/js/custom_field"; import {buildCustomFields, parseCustomField} from "@/common/js/custom_field";
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent"; import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
import TestCaseIssueList from "@/business/components/track/issue/TestCaseIssueList"; import TestCaseIssueList from "@/business/components/track/issue/TestCaseIssueList";
import IssueEditDetail from "@/business/components/track/issue/IssueEditDetail"; import IssueEditDetail from "@/business/components/track/issue/IssueEditDetail";
@ -201,7 +201,7 @@ export default {
this.form.creator = getCurrentUserId(); this.form.creator = getCurrentUserId();
} }
} }
parseCustomField(this.form, this.issueTemplate, this.customFieldForm, this.customFieldRules, null); parseCustomField(this.form, this.issueTemplate, this.customFieldForm, this.customFieldRules);
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.testCaseIssueList) { if (this.$refs.testCaseIssueList) {
this.$refs.testCaseIssueList.initTableData(); this.$refs.testCaseIssueList.initTableData();