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 c280708572..2c677a9d7a 100644
--- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java
+++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java
@@ -244,7 +244,7 @@ public class TestPlanService {
testPlan.setActualEndTime(null);
}
- if ((testPlan.getStatus().equals(TestPlanStatus.Finished.name()) || testPlan.getStatus().equals(TestPlanStatus.Completed.name()))
+ if (StringUtils.equalsAnyIgnoreCase(testPlan.getStatus(),TestPlanStatus.Finished.name(),TestPlanStatus.Completed.name())
&& res.getActualEndTime() == null) {
testPlan.setActualEndTime(System.currentTimeMillis());
}
@@ -256,7 +256,6 @@ public class TestPlanService {
extScheduleMapper.updateNameByResourceID(testPlan.getId(), testPlan.getName());// 同步更新该测试的定时任务的name
i = testPlanMapper.updateByPrimaryKeyWithBLOBs(testPlan); // 更新
}
-
return testPlanMapper.selectByPrimaryKey(testPlan.getId());
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue b/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue
index e46b031193..70333ff89d 100644
--- a/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue
@@ -22,7 +22,7 @@
{{ $t('test_track.sync_add_api_load') }}
-
+
@@ -67,7 +67,13 @@
flag:{
type:Boolean,
},
- width: String
+ width: String,
+ isSaving:{
+ type:Boolean,
+ default() {
+ return false;
+ }
+ }
},
watch: {
diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/TestCaseFunctionalRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/functional/TestCaseFunctionalRelevance.vue
index 7afab8699d..21e9f2bb19 100644
--- a/frontend/src/business/components/track/plan/view/comonents/functional/TestCaseFunctionalRelevance.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/functional/TestCaseFunctionalRelevance.vue
@@ -5,6 +5,7 @@
@save="saveCaseRelevance"
:plan-id="planId"
:flag="true"
+ :is-saving="isSaving"
ref="baseRelevance">
@@ -122,6 +123,7 @@ export default {
return {
openType: 'relevance',
result: {},
+ isSaving:false,
treeNodes: [],
selectNodeIds: [],
selectNodeNames: [],
@@ -159,6 +161,7 @@ export default {
},
methods: {
open() {
+ this.isSaving = false;
this.$refs.baseRelevance.open();
if (this.$refs.table) {
this.$refs.table.clear();
@@ -176,15 +179,19 @@ export default {
})
},
saveCaseRelevance(item) {
+ this.isSaving = true;
let param = {};
param.planId = this.planId;
param.ids = this.$refs.table.selectIds;
param.request = this.page.condition;
param.checked = item
this.result = this.$post('/test/plan/relevance', param, () => {
+ this.isSaving = false;
this.$success(this.$t('commons.save_success'));
this.$refs.baseRelevance.close();
this.$emit('refresh');
+ },(error) => {
+ this.isSaving = false;
});
},
search() {