diff --git a/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java b/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java index 7e9ceb9a45..b79d5b7141 100644 --- a/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java +++ b/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java @@ -61,6 +61,12 @@ public abstract class JiraAbstractClient extends BaseClient { ResponseEntity response = null; try { response = restTemplate.exchange(url, HttpMethod.GET, getAuthHttpEntity(), String.class, project.getId()); + } catch (HttpClientErrorException e) { + if (e.getRawStatusCode() == 404) { // Sass 的jira才有这个接口,报错则调用其他接口 + return this.getProject(projectKey).getIssueTypes(); + } + LogUtil.error(e.getMessage(), e); + MSException.throwException(e.getMessage()); } catch (Exception e) { LogUtil.error(e.getMessage(), e); MSException.throwException(e.getMessage()); diff --git a/backend/src/main/java/io/metersphere/track/issue/domain/jira/JiraIssueProject.java b/backend/src/main/java/io/metersphere/track/issue/domain/jira/JiraIssueProject.java index 35ed5159ee..320dc786fd 100644 --- a/backend/src/main/java/io/metersphere/track/issue/domain/jira/JiraIssueProject.java +++ b/backend/src/main/java/io/metersphere/track/issue/domain/jira/JiraIssueProject.java @@ -3,10 +3,13 @@ package io.metersphere.track.issue.domain.jira; import lombok.Getter; import lombok.Setter; +import java.util.List; + @Getter @Setter public class JiraIssueProject { private String id; private String name; private String key; + private List issueTypes; } diff --git a/frontend/src/business/components/project/menu/components/ProjectJiraConfig.vue b/frontend/src/business/components/project/menu/components/ProjectJiraConfig.vue index 155c9a3e8d..446e8ced42 100644 --- a/frontend/src/business/components/project/menu/components/ProjectJiraConfig.vue +++ b/frontend/src/business/components/project/menu/components/ProjectJiraConfig.vue @@ -10,13 +10,13 @@ - + - +