From 3225aad693ab66948b86e8e198418810ec12d843 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 31 May 2022 18:08:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=A4=9A=E6=AC=A1=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=88=A0=E9=99=A4=E8=AF=84=E8=AE=BA=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013667 --user=李玉号 【测试跟踪】功能用例 删除评论 ,多次点击删除 按钮 页面会报错 https://www.tapd.cn/55049933/s/1170473 --- .../io/metersphere/track/service/TestCaseCommentService.java | 2 +- 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 + .../components/track/review/commom/ReviewCommentItem.vue | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseCommentService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseCommentService.java index df5c7157db..1c88c77595 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseCommentService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseCommentService.java @@ -87,7 +87,7 @@ public class TestCaseCommentService { private void checkCommentOwner(String commentId) { TestCaseComment comment = testCaseCommentMapper.selectByPrimaryKey(commentId); if (comment == null) { - MSException.throwException("The requested resource does not exist."); + MSException.throwException(Translator.get("resource_not_exist")); } if (!StringUtils.equals(comment.getAuthor(), SessionUtils.getUser().getId())) { MSException.throwException(Translator.get("check_owner_comment")); diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 2361c9d14d..cbd09e8b2f 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -11,6 +11,7 @@ start_engine_fail=Start fail upload_fail=Upload fail invalid_parameter=Invalid parameter! name_already_exists=Name already exists +resource_not_exist=The resource does not exist or has been deleted #user related user_email_already_exists=User email already exists user_id_is_null=User ID cannot be null diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 8831c26a76..a25b1257bb 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -10,6 +10,7 @@ start_engine_fail=启动失败 upload_fail=文件上传失败 invalid_parameter=非法的参数 name_already_exists=该名称已经存在 +resource_not_exist=资源不存在或已删除 #user related user_email_already_exists=用户邮箱已存在 user_id_is_null=用户ID不能为空 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 4ef4deb1c3..9cdeafb2f7 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -10,6 +10,7 @@ start_engine_fail=啟動失敗 upload_fail=文件上傳失敗 invalid_parameter=非法的參數 name_already_exists=該名稱已經存在 +resource_not_exist=資源不存在或已刪除 #user related user_email_already_exists=用戶郵箱已存在 user_id_is_null=用戶ID不能為空 diff --git a/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue b/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue index cdf1860cbe..de8f569988 100644 --- a/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue +++ b/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue @@ -20,7 +20,7 @@ - +