From 02dc5331f75c957b13e0b73c4389ca4f3d163dcf Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 24 Sep 2020 17:48:08 +0800 Subject: [PATCH 01/14] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=AE=A1=E5=88=92=E6=89=80=E5=B1=9E=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/TestPlanService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 70ca52c95b..ca2f5a5455 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -115,7 +115,8 @@ public class TestPlanService { return Optional.ofNullable(testPlanMapper.selectByPrimaryKey(testPlanId)).orElse(new TestPlan()); } - public int editTestPlan(TestPlan testPlan) { + public int editTestPlan(TestPlanDTO testPlan) { + editTestPlanProject(testPlan); testPlan.setUpdateTime(System.currentTimeMillis()); checkTestPlanExist(testPlan); //进行中状态,写入实际开始时间 From 5212d4b723a11ce00cddab1318effa33ebb91b99 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Thu, 24 Sep 2020 17:50:04 +0800 Subject: [PATCH 02/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E5=8F=98=E9=87=8F=E6=B2=A1=E6=9C=89=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/notice/service/MailService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/notice/service/MailService.java b/backend/src/main/java/io/metersphere/notice/service/MailService.java index 015746fbb1..7ed6ec6e42 100644 --- a/backend/src/main/java/io/metersphere/notice/service/MailService.java +++ b/backend/src/main/java/io/metersphere/notice/service/MailService.java @@ -15,7 +15,8 @@ import io.metersphere.track.request.testreview.SaveCommentRequest; import io.metersphere.track.request.testreview.SaveTestCaseReviewRequest; import org.apache.commons.collections4.MapUtils; import org.apache.commons.io.IOUtils; -import org.flywaydb.core.internal.util.StringUtils; +import org.apache.commons.lang3.RegExUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.mail.MailException; import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.MimeMessageHelper; @@ -96,11 +97,10 @@ public class MailService { private String getContent(String template, Map context) { if (MapUtils.isNotEmpty(context)) { - context.forEach((k, v) -> { - if (v != null && !v.isEmpty()) { - StringUtils.replaceAll(template, "${" + k + "}", v); - } - }); + for (String k : context.keySet()) { + if (StringUtils.isNotBlank(context.get(k))) + template = RegExUtils.replaceAll(template, "\\$\\{" + k + "}", context.get(k)); + } } return template; } From ea4ce9e276c8d54dc65ad39c5e9d2134848b1c5b Mon Sep 17 00:00:00 2001 From: xuxm Date: Fri, 18 Sep 2020 13:52:08 +0800 Subject: [PATCH 03/14] =?UTF-8?q?update=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=E2=80=9C=E8=AE=A1=E5=88=92=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E2=80=9D=EF=BC=8C=E2=80=9C=E8=AE=A1=E5=88=92=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E2=80=9D=EF=BC=8C=E2=80=9C=E5=AE=9E=E9=99=85=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E2=80=9D=EF=BC=8C=E2=80=9C=E5=AE=9E=E9=99=85=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/plan/components/TestPlanList.vue | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index a2aee7c3da..6bb4e17386 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -70,20 +70,38 @@ + + + + + + Date: Fri, 18 Sep 2020 13:54:38 +0800 Subject: [PATCH 04/14] =?UTF-8?q?update=EF=BC=9A=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E8=A1=A8=E5=8D=95=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E2=80=98=E8=AE=A1=E5=88=92=E5=BC=80=E5=A7=8B=E2=80=99?= =?UTF-8?q?=EF=BC=8C=E2=80=98=E8=AE=A1=E5=88=92=E7=BB=93=E6=9D=9F=E2=80=99?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/plan/components/TestPlanEdit.vue | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue index 7a7f4d1aea..d08ea9714a 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue @@ -69,6 +69,30 @@ + + + + + + + + + + + + + + + + From 176c0381220ca4368911c2b320235b2c14682485 Mon Sep 17 00:00:00 2001 From: xuxm Date: Fri, 18 Sep 2020 13:59:18 +0800 Subject: [PATCH 05/14] =?UTF-8?q?update=EF=BC=9Atest=5Fplan=E5=A2=9E?= =?UTF-8?q?=E5=8A=A04=E4=B8=AA=E5=AD=97=E6=AE=B5=EF=BC=9Aplanned=5Fstart?= =?UTF-8?q?=5Ftime=E3=80=81planned=5Fend=5Ftime=E3=80=81actual=5Fstart=5Ft?= =?UTF-8?q?ime=E3=80=81actual=5Fend=5Ftime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/i18n/zh-CN.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 8716d4536e..fc36bf7909 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -730,6 +730,10 @@ export default { plan_status_prepare: "未开始", plan_status_running: "进行中", plan_status_completed: "已完成", + planned_start_time: "计划开始", + planned_end_time: "计划结束", + actual_start_time: "实际开始", + actual_end_time: "实际结束", plan_delete_confirm: "将删除该测试计划下所有用例,确认删除测试计划: ", plan_delete: "删除计划", }, From f0bc93176e47e39508deee215d6d28affecd9530 Mon Sep 17 00:00:00 2001 From: xuxm Date: Fri, 18 Sep 2020 14:04:36 +0800 Subject: [PATCH 06/14] =?UTF-8?q?update=EF=BC=9A=E5=A2=9E=E5=8A=A0test=5Fp?= =?UTF-8?q?lan=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=E7=9A=84=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/base/domain/TestPlan.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java index 9e73da87bc..91157b7c85 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java @@ -24,6 +24,14 @@ public class TestPlan implements Serializable { private String testCaseMatchRule; private String executorMatchRule; + + private Long plannedStartTime; + + private Long plannedEndTime; + + private Long actualStartTime; + + private Long actualEndTime; private Long createTime; From 8da67954ea4ec6be8a01c80168be5ca6e87de16a Mon Sep 17 00:00:00 2001 From: xuxm Date: Fri, 18 Sep 2020 14:12:55 +0800 Subject: [PATCH 07/14] =?UTF-8?q?update=EF=BC=9A=E5=A2=9E=E5=8A=A0test=5Fp?= =?UTF-8?q?lan=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=E7=9A=84?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/TestPlanMapper.xml | 126 +++++++++++++----- 1 file changed, 91 insertions(+), 35 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml index 5d92075a51..716bb2c64a 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml @@ -12,6 +12,10 @@ + + + + @@ -78,7 +82,7 @@ id, workspace_id, report_id, `name`, description, `status`, stage, principal, test_case_match_rule, - executor_match_rule, create_time, update_time + executor_match_rule, planned_start_time, planned_end_time, actual_start_time, actual_end_time, create_time, update_time tags @@ -114,7 +118,7 @@