fix(测试跟踪): 兼容非sass版本jira
This commit is contained in:
parent
e4f540abb6
commit
7af02fb059
|
@ -394,7 +394,12 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
|||
// 用户选择框
|
||||
return accountId;
|
||||
} else {
|
||||
return valObj.getString("id");
|
||||
String id = valObj.getString("id");
|
||||
if (StringUtils.isNotBlank(id)) {
|
||||
return valObj.getString("id");
|
||||
} else {
|
||||
return valObj.getString("key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
project.put("key", jiraKey);
|
||||
|
||||
JSONObject issuetype = new JSONObject();
|
||||
issuetype.put("name", issuetypeStr);
|
||||
issuetype.put("id", issuetypeStr);
|
||||
fields.put("issuetype", issuetype);
|
||||
|
||||
JSONObject addJiraIssueParam = new JSONObject();
|
||||
|
@ -484,7 +484,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
|
||||
public String getIssueType(String configStr) {
|
||||
ProjectIssueConfig projectConfig = super.getProjectConfig(configStr);
|
||||
String jiraIssueType = projectConfig.getJiraIssueType();
|
||||
String jiraIssueType = projectConfig.getJiraIssueTypeId();
|
||||
if (StringUtils.isBlank(jiraIssueType)) {
|
||||
MSException.throwException("请在项目中配置 Jira 问题类型!");
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
|
||||
public String getStoryType(String configStr) {
|
||||
ProjectIssueConfig projectConfig = super.getProjectConfig(configStr);
|
||||
String jiraStoryType = projectConfig.getJiraStoryType();
|
||||
String jiraStoryType = projectConfig.getJiraStoryTypeId();
|
||||
if (StringUtils.isBlank(jiraStoryType)) {
|
||||
MSException.throwException("请在项目中配置 Jira 需求类型!");
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public abstract class JiraAbstractClient extends BaseClient {
|
|||
}
|
||||
|
||||
public Map<String, JiraCreateMetadataResponse.Field> getCreateMetadata(String projectKey, String issueType) {
|
||||
String url = getBaseUrl() + "/issue/createmeta?projectKeys={1}&issuetypeNames={2}&expand=projects.issuetypes.fields";
|
||||
String url = getBaseUrl() + "/issue/createmeta?projectKeys={1}&issuetypeIds={2}&expand=projects.issuetypes.fields";
|
||||
ResponseEntity<String> response = null;
|
||||
Map<String, JiraCreateMetadataResponse.Field> fields = null;
|
||||
try {
|
||||
|
|
|
@ -6,7 +6,7 @@ import lombok.Setter;
|
|||
@Getter
|
||||
@Setter
|
||||
public class ProjectIssueConfig {
|
||||
private String jiraIssueType;
|
||||
private String jiraStoryType;
|
||||
private String jiraIssueTypeId;
|
||||
private String jiraStoryTypeId;
|
||||
private String projectKey;
|
||||
}
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
</ms-instructions-icon>
|
||||
</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 ? item.untranslatedName : item.name">
|
||||
<el-select filterable v-model="form.issueConfigObj.jiraIssueTypeId">
|
||||
<el-option v-for="item in issueTypes" :key="item.id" :label="item.name" :value="item.id">
|
||||
</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 ? item.untranslatedName : item.name">
|
||||
<el-select filterable v-model="form.issueConfigObj.jiraStoryTypeId">
|
||||
<el-option v-for="item in issueTypes" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
Loading…
Reference in New Issue