From d150ef0e90ff25bca16249c7f12073a7531709f9 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 27 Mar 2023 10:48:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=9B=9E=E6=94=B6=E7=AB=99=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E7=BC=96=E8=BE=91=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024821 --user=宋昌昌 【测试跟踪】功能用例-编辑用例新增tab页-用例列表删除该用例-编辑页面可保存成功-用例又恢复显示到用例列表 https://www.tapd.cn/55049933/s/1355791 --- .../src/main/java/io/metersphere/service/TestCaseService.java | 3 +++ .../backend/src/main/resources/i18n/messages_en_US.properties | 1 + .../backend/src/main/resources/i18n/messages_zh_CN.properties | 1 + .../backend/src/main/resources/i18n/messages_zh_TW.properties | 1 + 4 files changed, 6 insertions(+) diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java index f6c4da4058..a25e97d9e0 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java @@ -2276,6 +2276,9 @@ public class TestCaseService { if (testCaseWithBLOBs == null) { MSException.throwException(Translator.get("edit_load_test_not_found") + request.getId()); } + if (StringUtils.equals(testCaseWithBLOBs.getStatus(), CommonConstants.TrashStatus)) { + MSException.throwException(Translator.get("edit_trash_case_error")); + } request.setNum(testCaseWithBLOBs.getNum()); this.setNode(request); return editTestCase(request); diff --git a/test-track/backend/src/main/resources/i18n/messages_en_US.properties b/test-track/backend/src/main/resources/i18n/messages_en_US.properties index 0be56d5d9f..9909c67e42 100644 --- a/test-track/backend/src/main/resources/i18n/messages_en_US.properties +++ b/test-track/backend/src/main/resources/i18n/messages_en_US.properties @@ -167,6 +167,7 @@ swagger_url_scheduled_import_notification=SwaggerUrl Scheduled import notificati Swagger_parse_error=Swagger parsing failed, please confirm file format is correct! Swagger_parse_error_with_auth=Swagger parsing failed. Please check whether authentication information is correct or file format is correct! test_track.length_less_than=The title is too long, the length must be less than +edit_trash_case_error=The case has been put in trash, please recover before edit! # check owner check_owner_project=The current user does not have permission to operate this project check_owner_test=The current user does not have permission to operate this test diff --git a/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties b/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties index 20c77c397b..d9325a633f 100644 --- a/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -139,6 +139,7 @@ swagger_url_scheduled_import_notification=swagger_url定时导入通知 swagger_parse_error=Swagger 解析失败,请确认文件格式是否正确! swagger_parse_error_with_auth=Swagger 解析失败,请确认认证信息是否正确或文件格式是否正确! test_track.length_less_than=标题过长,字数必须小于 +edit_trash_case_error=用例已进入回收站, 请恢复后再编辑! # check owner check_owner_project=当前用户没有操作此项目的权限 check_owner_test=当前用户没有操作此测试的权限 diff --git a/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties b/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties index 6dd9d25e96..986a05960e 100644 --- a/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -139,6 +139,7 @@ swagger_url_scheduled_import_notification=swagger_url定時導入通知 swagger_parse_error=Swagger 解析失敗,請確認文件格式是否正確! swagger_parse_error_with_auth=Swagger 解析失敗,請確認認證信息是否正確或文件格式是否正確! test_track.length_less_than=標題過長,字數必須小於 +edit_trash_case_error=用例已進入回收站, 請恢復後再編輯! # check owner check_owner_project=當前用戶沒有操作此項目的權限 check_owner_test=當前用戶沒有操作此測試的權限