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 2fb42eff03..59637d696b 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -244,6 +244,11 @@ public class TestPlanService { testPlan.setActualEndTime(null); } + if ((testPlan.getStatus().equals(TestPlanStatus.Finished.name()) || testPlan.getStatus().equals(TestPlanStatus.Completed.name())) + && res.getActualEndTime() == null) { + testPlan.setActualEndTime(System.currentTimeMillis()); + } + int i; if (testPlan.getName() == null) {// 若是点击该测试计划,则仅更新了updateTime,其它字段全为null,使用updateByPrimaryKeySelective i = testPlanMapper.updateByPrimaryKeySelective(testPlan); diff --git a/frontend/src/business/components/common/components/table/MsCreateTimeColumn.vue b/frontend/src/business/components/common/components/table/MsCreateTimeColumn.vue index bbb2aac51a..76e45eedbd 100644 --- a/frontend/src/business/components/common/components/table/MsCreateTimeColumn.vue +++ b/frontend/src/business/components/common/components/table/MsCreateTimeColumn.vue @@ -3,7 +3,7 @@ :fields-width="fieldsWidth" prop="createTime" min-width="140px" - sortable="custom" + :sortable="sortable" :label="$t('commons.create_time')">