diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 2428f5fd42..721a685ab9 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -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(); } diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index fcf13dd7e3..7a0494f88c 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -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); diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index a4bcbd6a16..cd1b2611bf 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -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">