fix(系统设置): JIRA服务测试连接问题

--bug=1017093 --user=李玉号
【系统设置】系统设置-服务集成:JIRA服务地址填写禅道地址:http://172.16.10.66/zentao/,测试连接却成功
https://www.tapd.cn/55049933/s/1266541
This commit is contained in:
shiziyuan9527 2022-10-18 17:55:54 +08:00 committed by lyh
parent f60215c6fd
commit c5babcf763
5 changed files with 8 additions and 2 deletions

View File

@ -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));
}
}

View File

@ -192,7 +192,7 @@ public abstract class JiraAbstractClient extends BaseClient {
ResponseEntity<String> 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) {

View File

@ -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

View File

@ -159,3 +159,5 @@ test_case_status_finished=已完成
execute_not_pass=未通过
execute_pass=通过
jira_auth_error=账号名或密码(Token)错误
jira_auth_url_error=测试连接失败请检查Jira地址是否正确

View File

@ -160,3 +160,5 @@ test_case_status_finished=已完成
execute_not_pass=未通過
execute_pass=通過
jira_auth_error=賬號名或密碼(Token)錯誤
jira_auth_url_error=測試連接失敗請檢查Jira地址是否正確