From e1452d380e2f2663d78de9c7fb2c5cc7bf100f81 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Mon, 18 Dec 2023 17:04:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E9=9B=86=E6=88=90tapd=E6=97=B6=E6=B2=A1=E6=9C=89=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E9=A1=B9=E7=9B=AEID=EF=BC=8C=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1033154 --user=陈建星 【测试跟踪】项目集成tapd时没写项目ID,同步缺陷提示信息优化 https://www.tapd.cn/55049933/s/1444772 --- .../io/metersphere/service/issue/platform/TapdPlatform.java | 4 +++- .../backend/src/main/resources/i18n/messages_en_US.properties | 3 ++- .../backend/src/main/resources/i18n/messages_zh_CN.properties | 3 ++- .../backend/src/main/resources/i18n/messages_zh_TW.properties | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/TapdPlatform.java b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/TapdPlatform.java index 521ed16e87..605a686424 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/TapdPlatform.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/TapdPlatform.java @@ -198,7 +198,9 @@ public class TapdPlatform extends AbstractIssuePlatform { if (CollectionUtils.isEmpty(ids)) return; HashMap> customFieldMap = new HashMap<>(); - Map statusMap = tapdClient.getStatusMap(project.getTapdId()); + if (StringUtils.isBlank(project.getTapdId())) { + MSException.throwException(Translator.get("tapd_id_blank_error")); + } int index = 0; int limit = 50; 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 bfa2531ad2..6f665e8d03 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 @@ -248,4 +248,5 @@ case_export_text_validate_tip=Contains extremely long text, currently supported case_import_table_header_missing=Header information is missing! relate_resource=relate test_plan_run_message=The current test plan is running, please try again later ! -test_review_end_time_early=Deadline cannot be earlier than current time! \ No newline at end of file +test_review_end_time_early=Deadline cannot be earlier than current time! +tapd_id_blank_error=Enter the Tapd project ID in the project configuration \ No newline at end of file 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 62deb95e1d..a80190f779 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 @@ -219,4 +219,5 @@ case_export_text_validate_tip=包含超长文本,目前支持最大长度为 % case_import_table_header_not_exist=缺少表头信息! relate_resource=关联 test_plan_run_message=当前测试计划正在执行中,请稍后再试! -test_review_end_time_early=截止时间不能早于当前时间! \ No newline at end of file +test_review_end_time_early=截止时间不能早于当前时间! +tapd_id_blank_error=请在项目配置填写 Tapd 项目ID \ No newline at end of file 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 8d5878411c..c7bc8dc872 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 @@ -219,4 +219,5 @@ case_export_text_validate_tip=包含超長文本,目前支持最大長度為 % case_import_table_header_not_exist=缺少表頭信息! relate_resource=關聯 test_plan_run_message=當前測試計劃正在執行中,請稍後再試! -test_review_end_time_early=截止時間不能早於當前時間! \ No newline at end of file +test_review_end_time_early=截止時間不能早於當前時間! +tapd_id_blank_error=請在項目配置填寫 Tapd 項目ID \ No newline at end of file