From 012b5d64a7614cbf374f90d5c7a74ab89eaa9096 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 28 Jan 2021 10:46:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E5=9C=BA=E6=99=AF=E7=94=A8=E4=BE=8B=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E3=80=81ID=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml | 6 ++++-- .../plan/view/comonents/api/TestPlanApiScenarioList.vue | 8 +++++++- .../view/comonents/api/TestPlanScenarioListHeader.vue | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml index 508197b62d..4800d42428 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml @@ -19,7 +19,7 @@ select t.id, t.environment_id, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id, c.id as case_id, c.project_id, c.user_id,c.api_scenario_module_id, c.module_path, c.name, c.level, - c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description, + c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description, c.tags, c.num, p.name as project_name, p.id as project_id, u.name as user_name from test_plan_api_scenario t @@ -44,7 +44,9 @@ - and c.name like CONCAT('%', #{request.name},'%') + and (c.name like CONCAT('%', #{request.name},'%') + or c.num like CONCAT('%', #{request.name},'%') + or c.tags like CONCAT('%', #{request.name},'%')) and t.last_result like CONCAT('%', #{request.status},'%') diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue index bd2789f4b1..fd3fbac396 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue @@ -15,6 +15,7 @@ + @@ -159,6 +160,11 @@ let data = response.data; this.total = data.itemCount; this.tableData = data.listObject; + this.tableData.forEach(item => { + if (item.tags && item.tags.length > 0) { + item.tags = JSON.parse(item.tags); + } + }); this.loading = false; }); }, diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue index e0433b30cf..a1d6b87f53 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue @@ -3,7 +3,7 @@ :condition="condition" @search="$emit('refresh')" :show-create="false" - :tip="$t('commons.search_by_name_or_id')"> + :tip="$t('commons.search_by_id_name_tag')"> From 5eec3db477bba3f72fd6ff0fa47656a0909cb99e Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Thu, 28 Jan 2021 11:13:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?-=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B-=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=89=80=E6=9C=89=E6=95=B0=E6=8D=AE=E6=89=B9=E9=87=8F=E7=BC=96?= =?UTF-8?q?=E8=BE=91-=E9=9D=A2=E6=9D=BF=E5=8F=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复测试跟踪-测试用例-选择所有数据批量编辑-面板只显示当前页面数据的问题 --- .../table/MsTableHeaderSelectPopover.vue | 17 ----------------- .../track/case/components/BatchEdit.vue | 3 ++- .../track/case/components/TestCaseList.vue | 10 +++++++++- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/frontend/src/business/components/common/components/table/MsTableHeaderSelectPopover.vue b/frontend/src/business/components/common/components/table/MsTableHeaderSelectPopover.vue index bca7760b96..f5ee7b6f64 100644 --- a/frontend/src/business/components/common/components/table/MsTableHeaderSelectPopover.vue +++ b/frontend/src/business/components/common/components/table/MsTableHeaderSelectPopover.vue @@ -15,23 +15,6 @@ props: ['total', 'pageSize'], data() { return { - gridData: [{ - date: '2016-05-02', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }, { - date: '2016-05-04', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }, { - date: '2016-05-01', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }, { - date: '2016-05-03', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }] }; } } diff --git a/frontend/src/business/components/track/case/components/BatchEdit.vue b/frontend/src/business/components/track/case/components/BatchEdit.vue index 9054126560..0fd6678255 100644 --- a/frontend/src/business/components/track/case/components/BatchEdit.vue +++ b/frontend/src/business/components/track/case/components/BatchEdit.vue @@ -81,7 +81,8 @@ if (size) { this.size = size; } else { - this.size = this.$parent.selectRows.size; + // this.size = this.$parent.selectRows.size; + this.size = this.$parent.selectDataCounts; } listenGoBack(this.handleClose); }, diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 791dcb6ef2..f63ddc8a7d 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -46,7 +46,7 @@ Date: Thu, 28 Jan 2021 11:18:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=82=AE=E4=BB=B6=E6=97=A5=E5=BF=97=EF=BC=8C=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/jmeter/APIBackendListenerClient.java | 5 ----- .../io/metersphere/notice/sender/impl/MailNoticeSender.java | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index ae9fbf35be..9fa6f503f5 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -227,12 +227,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl LogUtil.error(e.getMessage(), e); } } - try { sendTask(report, reportUrl, testResult); - } catch (Exception e) { - LogUtil.error(e.getMessage(), e); - } - } private static void sendTask(ApiTestReport report, String reportUrl, TestResult testResult) { diff --git a/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java b/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java index dc61109f9b..d688e08b78 100644 --- a/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java +++ b/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java @@ -20,10 +20,13 @@ public class MailNoticeSender extends AbstractNoticeSender { private MailService mailService; private void sendMail(MessageDetail messageDetail, String context, NoticeModel noticeModel) throws MessagingException { + LogUtil.info("发送邮件开始 "); JavaMailSenderImpl javaMailSender = mailService.getMailSender(); MimeMessage mimeMessage = javaMailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true); helper.setFrom(javaMailSender.getUsername()); + LogUtil.info("发件人地址"+javaMailSender.getUsername()); + LogUtil.info("helper"+helper); helper.setSubject("MeterSphere " + noticeModel.getSubject()); List emails = super.getUserEmails(messageDetail.getUserIds()); String[] users = emails.toArray(new String[0]); @@ -38,6 +41,7 @@ public class MailNoticeSender extends AbstractNoticeSender { String context = super.getHtmlContext(messageDetail, noticeModel); try { sendMail(messageDetail, context, noticeModel); + LogUtil.info("发送邮件结束"); } catch (Exception e) { LogUtil.error(e); }