From aa1af13b42a61be19cd9cae22041ad83a487e871 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 17 Jan 2022 16:36:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=AF=BC=E5=85=A5=E6=8F=90=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009572 --user=lyh 【接口测试】场景导入没反应 https://www.tapd.cn/55049933/s/1092947 --- .../java/io/metersphere/api/service/ApiAutomationService.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 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 8b2e781d7e..d5c1bd341d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1170,7 +1170,7 @@ public class ApiAutomationService { if (CollectionUtils.isNotEmpty(list)) { LogUtil.error("import scenario fail, custom num is exist: " + scenarioWithBLOBs.getCustomNum()); - return scenarioWithBLOBs; + MSException.throwException(Translator.get("import_fail_custom_num_exists") + ": " + scenarioWithBLOBs.getCustomNum()); } if (StringUtils.equals("fullCoverage", apiTestImportRequest.getModeId())) { diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 25fe2c3114..a3b0b3f567 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -223,6 +223,7 @@ delete_check_reference_by=be referenced by Scenario not_execute=Not execute execute_not_pass=Not pass execute_pass=Pass +import_fail_custom_num_exists=import fail, custom num is exists #authsource authsource_name_already_exists=Authentication source name already exists authsource_name_is_null=Authentication source name cannot be empty diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 27257a5f8f..e887ad8d6d 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -223,6 +223,7 @@ delete_check_reference_by=被场景引用 not_execute=未执行 execute_not_pass=未通过 execute_pass=通过 +import_fail_custom_num_exists=导入失败,自定义ID已存在 #authsource authsource_name_already_exists=认证源名称已经存在 authsource_name_is_null=认证源名称不能为空 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 962c5f6bac..137b8bc200 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -223,6 +223,7 @@ delete_check_reference_by=被場景引用 not_execute=未執行 execute_not_pass=未通過 execute_pass=通過 +import_fail_custom_num_exists=導入失敗,自定義ID已存在 #authsource authsource_name_already_exists=認證源名稱已經存在 authsource_name_is_null=認證源名稱不能為空