diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index de538fc794..91729c0b0c 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -842,6 +842,13 @@ public class TestPlanService { this.verifyPool(projectId, runModeConfig); //创建测试报告,然后返回的ID重新赋值为resourceID,作为后续的参数 TestPlanScheduleReportInfoDTO reportInfoDTO = this.genTestPlanReport(planReportId, testPlanId, userId, triggerMode, runModeConfig); + //定时任务执行重新设置实际开始时间 + if (StringUtils.equals(triggerMode, TriggerMode.SCHEDULE.name())) { + TestPlanWithBLOBs testPlanWithBLOBs = new TestPlanWithBLOBs(); + testPlanWithBLOBs.setId(testPlanId); + testPlanWithBLOBs.setActualStartTime(System.currentTimeMillis()); + testPlanMapper.updateByPrimaryKeySelective(testPlanWithBLOBs); + } //测试计划准备执行,取消测试计划的实际结束时间 extTestPlanMapper.updateActualEndTimeIsNullById(testPlanId);