fix(测试跟踪): 复制功能用例没有复制自定义字段

--bug=1016594 --user=陈建星 【测试跟踪】github#17671,功能用例,复制的功能用例,单选下拉列表类型的字段值没有成功复制 https://www.tapd.cn/55049933/s/1239853
This commit is contained in:
AnAngle 2022-09-07 12:13:12 +08:00 committed by jianxing
parent c4f46e2b92
commit 1c75776ede
2 changed files with 2 additions and 1 deletions

View File

@ -613,6 +613,7 @@ export default {
this.$nextTick(() => {
this.showInputTag = true;
});
this.form.id = null;
} else {
this.getTestCase(testCase.id);
}

View File

@ -114,7 +114,7 @@ export function buildCustomFields(data, param, template) {
} else {
customField['value'] = item.defaultValue ? JSON.stringify(item.defaultValue): "";
}
if (item.isEdit) {
if (item.isEdit && data.id) {
editFields.push(customField);
} else {
addFields.push(customField);