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;
|
ResponseEntity<String> response = null;
|
||||||
try {
|
try {
|
||||||
response = restTemplate.exchange(url, HttpMethod.GET, getAuthHttpEntity(), String.class, project.getId());
|
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) {
|
} catch (Exception e) {
|
||||||
LogUtil.error(e.getMessage(), e);
|
LogUtil.error(e.getMessage(), e);
|
||||||
MSException.throwException(e.getMessage());
|
MSException.throwException(e.getMessage());
|
||||||
|
|
|
@ -3,10 +3,13 @@ package io.metersphere.track.issue.domain.jira;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class JiraIssueProject {
|
public class JiraIssueProject {
|
||||||
private String id;
|
private String id;
|
||||||
private String name;
|
private String name;
|
||||||
private String key;
|
private String key;
|
||||||
|
private List<JiraIssueType> issueTypes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="labelWidth" :label="$t('organization.integration.jira_issuetype')" prop="issuetype">
|
<el-form-item :label-width="labelWidth" :label="$t('organization.integration.jira_issuetype')" prop="issuetype">
|
||||||
<el-select filterable v-model="form.issueConfigObj.jiraIssueType">
|
<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-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="labelWidth" :label="$t('organization.integration.jira_storytype')" prop="storytype">
|
<el-form-item :label-width="labelWidth" :label="$t('organization.integration.jira_storytype')" prop="storytype">
|
||||||
<el-select filterable v-model="form.issueConfigObj.jiraStoryType">
|
<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-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
Loading…
Reference in New Issue