diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml index 429d773f17..c784654ec5 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml @@ -262,9 +262,10 @@ api_test_case c on t.api_case_id = c.id and t.test_plan_id = #{planId} - - and t.status = 'error' - + + and t.status = 'error' + + and c.status != 'Trash' where t.test_plan_id = #{planId}; diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index 2459cfc972..5d86e28ee0 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -477,6 +477,7 @@ and tptc.status = 'Failure' + and tc.status != 'Trash' where tptc.plan_id = #{planId} order by tptc.update_time desc 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 bd722b199a..2fb42eff03 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -239,6 +239,10 @@ public class TestPlanService { } // 非已结束->已结束,更新结束时间 } + if (StringUtils.isNotBlank(testPlan.getStatus()) && testPlan.getStatus().equals(TestPlanStatus.Prepare.name())) { + testPlan.setActualStartTime(null); + testPlan.setActualEndTime(null); + } int i; if (testPlan.getName() == null) {// 若是点击该测试计划,则仅更新了updateTime,其它字段全为null,使用updateByPrimaryKeySelective diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue index 288964ccbd..23c2444d96 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue @@ -470,7 +470,9 @@ export default { this.$set(this.tableData[i], "issuesContent", JSON.parse(this.tableData[i].issues)); } } - this.$refs.table.clear(); + if (this.$refs.table) { + this.$refs.table.clear(); + } checkTableRowIsSelected(this, this.$refs.table); }); } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue index 4ad8a86e2f..4766e95c2f 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue @@ -3,7 +3,7 @@ + v-if="!isTemplate && !isShare"/> diff --git a/frontend/src/business/components/track/report/components/TestPlanReportReview.vue b/frontend/src/business/components/track/report/components/TestPlanReportReview.vue index 2da7d26d69..d4ecee8114 100644 --- a/frontend/src/business/components/track/report/components/TestPlanReportReview.vue +++ b/frontend/src/business/components/track/report/components/TestPlanReportReview.vue @@ -61,7 +61,11 @@ export default { // this.handleClose(); // }, open(plan) { - this.plan = plan; + // 每次都重新获取 + this.plan = {id: null} + this.$nextTick(() => { + this.plan = plan; + }); this.showDialog = true; // this.listenGoBack(); }, diff --git a/frontend/src/common/js/default-table-header.js b/frontend/src/common/js/default-table-header.js index 7f6ea8e44c..1ae25e6375 100644 --- a/frontend/src/common/js/default-table-header.js +++ b/frontend/src/common/js/default-table-header.js @@ -136,7 +136,6 @@ export let CUSTOM_TABLE_HEADER = { {id: 'priority', key: '3', label: 'test_track.case.priority'}, {id: 'path', key: '4', label: 'api_test.definition.api_path'}, {id: 'createUser', key: '5', label: 'api_test.creator'}, - {id: 'custom', key: '6', label: 'api_test.definition.api_last_time'}, {id: 'tags', key: '7', label: 'commons.tag'}, {id: 'execResult', key: '8', label: 'test_track.plan.execute_result'}, {id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'}, diff --git a/frontend/src/network/load-test.js b/frontend/src/network/load-test.js index 4f21ee0753..50e9452151 100644 --- a/frontend/src/network/load-test.js +++ b/frontend/src/network/load-test.js @@ -71,10 +71,10 @@ export function getSharePerformanceReportResponseCodeChart(shareId, reportId, ca } export function getPerformanceReportDetailContent(reportKey, reportId, callback) { - return reportId ? baseGet('/performance/report/content/' + reportKey + '/' + reportId, callback) : {}; + return reportId ? baseGet('/performance/report/content/' + reportKey + '/' + reportId, callback) : new Promise(()=>{}); } export function getSharePerformanceReportDetailContent(shareId, reportKey, reportId, callback) { - return reportId ? baseGet('/share/performance/report/content/' + shareId + '/' + reportKey + '/' + reportId, callback) : {}; + return reportId ? baseGet('/share/performance/report/content/' + shareId + '/' + reportKey + '/' + reportId, callback) : new Promise(()=>{}); } export function getPerformanceReportContent(reportId, callback) { @@ -113,15 +113,15 @@ export function getSharePerformanceReportLogResourceDetail(shareId, reportId, re } export function getPerformanceMetricQueryResource(resourceId, callback) { - return resourceId ? baseGet('/metric/query/resource/' + resourceId, callback) : {}; + return resourceId ? baseGet('/metric/query/resource/' + resourceId, callback) : new Promise(()=>{}); } export function getSharePerformanceMetricQueryResource(shareId, resourceId, callback) { - return resourceId ? baseGet('/share/metric/query/resource/' + shareId + '/' + resourceId, callback) : {}; + return resourceId ? baseGet('/share/metric/query/resource/' + shareId + '/' + resourceId, callback) : new Promise(()=>{}); } export function getPerformanceMetricQuery(resourceId, callback) { return resourceId ? baseGet('/metric/query/' + resourceId, callback) : {}; } export function getSharePerformanceMetricQuery(shareId, resourceId, callback) { - return resourceId ? baseGet('/share/metric/query/' + shareId + '/' + resourceId, callback) : {}; + return resourceId ? baseGet('/share/metric/query/' + shareId + '/' + resourceId, callback) : new Promise(()=>{}); }