diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index e15d641499..506ebcbe29 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1317,14 +1317,10 @@ public class TestPlanService { String targetPlanId = UUID.randomUUID().toString(); TestPlanWithBLOBs targetPlan = new TestPlanWithBLOBs(); + BeanUtils.copyBean(targetPlan, testPlan); + // 覆盖原内容 targetPlan.setId(targetPlanId); targetPlan.setName(testPlan.getName() + "_" + UUID.randomUUID().toString().substring(0, 5) + "_COPY"); - targetPlan.setWorkspaceId(testPlan.getWorkspaceId()); - targetPlan.setDescription(testPlan.getDescription()); - targetPlan.setStage(testPlan.getStage()); - targetPlan.setTags(testPlan.getTags()); - targetPlan.setProjectId(testPlan.getProjectId()); - testPlan.setAutomaticStatusUpdate(testPlan.getAutomaticStatusUpdate()); targetPlan.setStatus(TestPlanStatus.Prepare.name()); targetPlan.setCreator(SessionUtils.getUserId()); targetPlan.setCreateTime(System.currentTimeMillis()); diff --git a/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql b/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql new file mode 100644 index 0000000000..8a26c95d5c --- /dev/null +++ b/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql @@ -0,0 +1,2 @@ +-- 修复数据 +update test_plan set repeat_case = 0 where repeat_case is null; \ No newline at end of file