From bb04dc0aa7185513bad68a0cacf763a84e35dda2 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 17 Jan 2022 15:49:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E5=85=B1=E7=94=A8=E4=BE=8B=E5=BA=93?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=85=B6=E4=BB=96=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/TestCaseService.java | 2 ++ .../components/track/case/components/TestCaseEdit.vue | 4 +++- .../components/track/case/components/TestCaseList.vue | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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">