fix(测试跟踪): 修复公共用例库复制其他信息

This commit is contained in:
wxg0103 2022-01-17 15:49:40 +08:00 committed by 刘瑞斌
parent e9a89cd7bb
commit bb04dc0aa7
3 changed files with 6 additions and 2 deletions

View File

@ -1460,6 +1460,7 @@ public class TestCaseService {
TestCaseWithBLOBs batchCopy = new TestCaseWithBLOBs();
BeanUtils.copyBean(batchCopy, list.get(i));
checkTestCaseExist(batchCopy);
String oldTestCaseId = batchCopy.getId();
String id = UUID.randomUUID().toString();
batchCopy.setId(id);
batchCopy.setName(ServiceUtils.getCopyName(batchCopy.getName()));
@ -1482,6 +1483,7 @@ public class TestCaseService {
batchCopy.setCustomNum(String.valueOf(nextNum));
batchCopy.setNum(nextNum++);
mapper.insert(batchCopy);
dealWithCopyOtherInfo(batchCopy, oldTestCaseId);
if (i % 50 == 0)
sqlSession.flushStatements();
}

View File

@ -316,6 +316,7 @@ export default {
newData: null,
selectedOtherInfo: null,
currentProjectId: "" ,
casePublic: false
};
},
props: {
@ -529,7 +530,7 @@ export default {
}
})
} else if (e === 'ADD_AND_PUBLIC') {
this.form.casePublic = true;
this.casePublic = true;
this.saveCase();
} else {
this.saveCase();
@ -798,6 +799,7 @@ export default {
}
param.testId = JSON.stringify(this.form.selected);
param.tags = this.form.tags;
param.casePublic = this.casePublic;
param.type = 'functional';
buildCustomFields(this.form, param, this.testCaseTemplate);
this.parseOldFields(param);

View File

@ -147,7 +147,7 @@
:label="$t('project.version.name')"
:field="item"
:fields-width="fieldsWidth"
:filters="versionFilters"
:filters="!publicEnable ? versionFilters : null"
min-width="100px"
prop="versionId">
<template v-slot:default="scope">