fix(测试计划): 复制测试计划时未复制所有字段导致关联用例报错

--bug=1008539
--user=lyh
【测试计划】关联接口用例报错【+github#8057】
https://www.tapd.cn/55049933/s/1077518

Closes #8057
This commit is contained in:
shiziyuan9527 2021-12-03 11:32:42 +08:00 committed by shiziyuan9527
parent 604ebcc8da
commit bb6f39a41b
2 changed files with 4 additions and 6 deletions

View File

@ -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());

View File

@ -0,0 +1,2 @@
-- 修复数据
update test_plan set repeat_case = 0 where repeat_case is null;