fix: 非Sass版Jira获取不到问题类型
This commit is contained in:
parent
682bfae7c5
commit
cce3559129
|
@ -61,6 +61,12 @@ public abstract class JiraAbstractClient extends BaseClient {
|
|||
ResponseEntity<String> 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());
|
||||
|
|
|
@ -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<JiraIssueType> issueTypes;
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
</el-form-item>
|
||||
<el-form-item :label-width="labelWidth" :label="$t('organization.integration.jira_issuetype')" prop="issuetype">
|
||||
<el-select filterable v-model="form.issueConfigObj.jiraIssueType">
|
||||
<el-option v-for="item in issueTypes" :key="item.id" :label="item.name" :value="item.untranslatedName">
|
||||
<el-option v-for="item in issueTypes" :key="item.id" :label="item.name" :value="item.untranslatedName ? item.untranslatedName : item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="labelWidth" :label="$t('organization.integration.jira_storytype')" prop="storytype">
|
||||
<el-select filterable v-model="form.issueConfigObj.jiraStoryType">
|
||||
<el-option v-for="item in issueTypes" :key="item.id" :label="item.name" :value="item.untranslatedName">
|
||||
<el-option v-for="item in issueTypes" :key="item.id" :label="item.name" :value="item.untranslatedName ? item.untranslatedName : item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
Loading…
Reference in New Issue