fix(测试跟踪): 修复公共用例库复制其他信息
This commit is contained in:
parent
e9a89cd7bb
commit
bb04dc0aa7
|
@ -1460,6 +1460,7 @@ public class TestCaseService {
|
||||||
TestCaseWithBLOBs batchCopy = new TestCaseWithBLOBs();
|
TestCaseWithBLOBs batchCopy = new TestCaseWithBLOBs();
|
||||||
BeanUtils.copyBean(batchCopy, list.get(i));
|
BeanUtils.copyBean(batchCopy, list.get(i));
|
||||||
checkTestCaseExist(batchCopy);
|
checkTestCaseExist(batchCopy);
|
||||||
|
String oldTestCaseId = batchCopy.getId();
|
||||||
String id = UUID.randomUUID().toString();
|
String id = UUID.randomUUID().toString();
|
||||||
batchCopy.setId(id);
|
batchCopy.setId(id);
|
||||||
batchCopy.setName(ServiceUtils.getCopyName(batchCopy.getName()));
|
batchCopy.setName(ServiceUtils.getCopyName(batchCopy.getName()));
|
||||||
|
@ -1482,6 +1483,7 @@ public class TestCaseService {
|
||||||
batchCopy.setCustomNum(String.valueOf(nextNum));
|
batchCopy.setCustomNum(String.valueOf(nextNum));
|
||||||
batchCopy.setNum(nextNum++);
|
batchCopy.setNum(nextNum++);
|
||||||
mapper.insert(batchCopy);
|
mapper.insert(batchCopy);
|
||||||
|
dealWithCopyOtherInfo(batchCopy, oldTestCaseId);
|
||||||
if (i % 50 == 0)
|
if (i % 50 == 0)
|
||||||
sqlSession.flushStatements();
|
sqlSession.flushStatements();
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,6 +316,7 @@ export default {
|
||||||
newData: null,
|
newData: null,
|
||||||
selectedOtherInfo: null,
|
selectedOtherInfo: null,
|
||||||
currentProjectId: "" ,
|
currentProjectId: "" ,
|
||||||
|
casePublic: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -529,7 +530,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (e === 'ADD_AND_PUBLIC') {
|
} else if (e === 'ADD_AND_PUBLIC') {
|
||||||
this.form.casePublic = true;
|
this.casePublic = true;
|
||||||
this.saveCase();
|
this.saveCase();
|
||||||
} else {
|
} else {
|
||||||
this.saveCase();
|
this.saveCase();
|
||||||
|
@ -798,6 +799,7 @@ export default {
|
||||||
}
|
}
|
||||||
param.testId = JSON.stringify(this.form.selected);
|
param.testId = JSON.stringify(this.form.selected);
|
||||||
param.tags = this.form.tags;
|
param.tags = this.form.tags;
|
||||||
|
param.casePublic = this.casePublic;
|
||||||
param.type = 'functional';
|
param.type = 'functional';
|
||||||
buildCustomFields(this.form, param, this.testCaseTemplate);
|
buildCustomFields(this.form, param, this.testCaseTemplate);
|
||||||
this.parseOldFields(param);
|
this.parseOldFields(param);
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
:label="$t('project.version.name')"
|
:label="$t('project.version.name')"
|
||||||
:field="item"
|
:field="item"
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
:filters="versionFilters"
|
:filters="!publicEnable ? versionFilters : null"
|
||||||
min-width="100px"
|
min-width="100px"
|
||||||
prop="versionId">
|
prop="versionId">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
|
|
Loading…
Reference in New Issue