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