diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index f93540483c..6a37d4d1c9 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -262,7 +262,7 @@ public class TestCaseService { return testCaseMapper.selectByPrimaryKey(testCaseId); } - public int editTestCase(TestCaseWithBLOBs testCase) { + public TestCaseWithBLOBs editTestCase(TestCaseWithBLOBs testCase) { checkTestCustomNum(testCase); testCase.setUpdateTime(System.currentTimeMillis()); // 更新数据 @@ -284,7 +284,8 @@ public class TestCaseService { testCase.setRefId(oldTestCase.getRefId()); testCaseMapper.insertSelective(testCase); } - return testCaseMapper.updateByPrimaryKeySelective(testCase); + testCaseMapper.updateByPrimaryKeySelective(testCase); + return testCaseMapper.selectByPrimaryKey(testCase.getId()); } public TestCaseWithBLOBs checkTestCaseExist(TestCaseWithBLOBs testCase) { @@ -1545,9 +1546,7 @@ public class TestCaseService { }); } this.setNode(request); - editTestCase(request); - //saveFollows(request.getId(), request.getFollows()); - return testCaseWithBLOBs; + return editTestCase(request); } public String editTestCase(EditTestCaseRequest request, List files) { diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 328a051b54..16586dbe7a 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -748,9 +748,6 @@ export default { if (callback) { callback(this); } - if (hasLicense()) { - this.getVersionHistory(); - } // 保存用例后刷新附件 }); } @@ -953,7 +950,7 @@ export default { create(row) { // 创建新版本 this.form.versionId = row.id; - this.saveCase(); + this.saveCase(this.getVersionHistory); }, del(row) { let that = this;