diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java index d8309eb3fa..f30fbace6e 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BaseIntegrationService.java @@ -98,6 +98,6 @@ public class BaseIntegrationService { } public void authServiceIntegration(String workspaceId, String platform) { - microService.getForResultHolder(MicroServiceName.TEST_TRACK, String.format("/issues/auth/%s/%s", workspaceId, platform)); + microService.getForData(MicroServiceName.TEST_TRACK, String.format("/issues/auth/%s/%s", workspaceId, platform)); } } diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/client/JiraAbstractClient.java b/test-track/backend/src/main/java/io/metersphere/service/issue/client/JiraAbstractClient.java index 42b55a98ee..c037e2fbb6 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/client/JiraAbstractClient.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/client/JiraAbstractClient.java @@ -192,7 +192,7 @@ public abstract class JiraAbstractClient extends BaseClient { ResponseEntity response = null; try { response = restTemplate.exchange(getBaseUrl() + "/myself", HttpMethod.GET, getAuthHttpEntity(), String.class); - if (StringUtils.isNotBlank(response.getBody()) && !response.getBody().startsWith("{\"self\"")) { + if (StringUtils.isBlank(response.getBody()) || (StringUtils.isNotBlank(response.getBody()) && !response.getBody().startsWith("{\"self\""))) { MSException.throwException(Translator.get("jira_auth_url_error")); } } catch (HttpClientErrorException e) { diff --git a/test-track/backend/src/main/resources/i18n/commons_en_US.properties b/test-track/backend/src/main/resources/i18n/commons_en_US.properties index e7d416efaf..15b13c179a 100644 --- a/test-track/backend/src/main/resources/i18n/commons_en_US.properties +++ b/test-track/backend/src/main/resources/i18n/commons_en_US.properties @@ -187,3 +187,5 @@ test_case_status_saved=Saved execute_not_pass=Not pass execute_pass=Pass +jira_auth_error=Account name or password (Token) is wrong +jira_auth_url_error=The test connection failed, please check whether the Jira address is correct \ No newline at end of file diff --git a/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties b/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties index 46977c75bc..520ddc6728 100644 --- a/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties +++ b/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties @@ -159,3 +159,5 @@ test_case_status_finished=已完成 execute_not_pass=未通过 execute_pass=通过 +jira_auth_error=账号名或密码(Token)错误 +jira_auth_url_error=测试连接失败,请检查Jira地址是否正确 \ No newline at end of file diff --git a/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties b/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties index c954cee226..ec639ae034 100644 --- a/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties +++ b/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties @@ -160,3 +160,5 @@ test_case_status_finished=已完成 execute_not_pass=未通過 execute_pass=通過 +jira_auth_error=賬號名或密碼(Token)錯誤 +jira_auth_url_error=測試連接失敗,請檢查Jira地址是否正確 \ No newline at end of file