fix: 企业版用户同步jira缺陷缺少部分字段
This commit is contained in:
parent
0292e485f6
commit
f95263176f
|
@ -27,9 +27,6 @@ import io.metersphere.track.service.IssuesService;
|
|||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.commonmark.node.Node;
|
||||
import org.commonmark.parser.Parser;
|
||||
import org.commonmark.renderer.html.HtmlRenderer;
|
||||
import org.springframework.web.client.HttpClientErrorException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -97,6 +94,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
|
||||
// 附件处理
|
||||
Map<String, String> fileContentMap = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(attachments)) {
|
||||
for (int i = 0; i < attachments.size(); i++) {
|
||||
JSONObject attachment = attachments.getJSONObject(i);
|
||||
String filename = attachment.getString("filename");
|
||||
|
@ -109,6 +107,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
fileContentMap.put(filename, contentUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String[] splitStrs = description.split("\\n\\n");
|
||||
for (int j = 0; j < splitStrs.length; j++) {
|
||||
|
@ -137,7 +136,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
JSONObject statusObj = (JSONObject) fields.get("status");
|
||||
if (statusObj != null) {
|
||||
JSONObject statusCategory = (JSONObject) statusObj.get("statusCategory");
|
||||
return statusCategory.getString("name");
|
||||
return statusObj.getString("name") == null ? statusCategory.getString("name") : statusObj.getString("name");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ public abstract class JiraAbstractClient extends BaseClient {
|
|||
|
||||
public JiraIssueListResponse getProjectIssues(int startAt, int maxResults, String projectKey, String issueType) {
|
||||
ResponseEntity<String> responseEntity;
|
||||
responseEntity = restTemplate.exchange(getBaseUrl() + "/search?startAt={1}&maxResults={2}&jql=project={3}+AND+issuetype={4}&fields=status,assignee,summary,created,updated,attachment,description",
|
||||
responseEntity = restTemplate.exchange(getBaseUrl() + "/search?startAt={1}&maxResults={2}&jql=project={3}+AND+issuetype={4}",
|
||||
HttpMethod.GET, getAuthHttpEntity(), String.class, startAt, maxResults, projectKey, issueType);
|
||||
return (JiraIssueListResponse)getResultForObject(JiraIssueListResponse.class, responseEntity);
|
||||
}
|
||||
|
|
|
@ -300,3 +300,5 @@ ALTER TABLE `api_scenario_reference_id` ADD INDEX index_method ( `method` );
|
|||
ALTER TABLE `api_scenario` ADD INDEX index_project_id ( `project_id`);
|
||||
|
||||
ALTER TABLE share_info ADD lang varchar(10) NULL;
|
||||
|
||||
UPDATE system_parameter SET param_value = 'http://grid-local:4444' WHERE param_key = 'base.selenium.docker.url';
|
||||
|
|
Loading…
Reference in New Issue