简体   繁体   English

获取所有存储在吉拉的问题

[英]get all issues stored in jira

hi i want to get all issues stored in jira from java using jql or any othere way. 嗨,我想使用jql或任何其他方式从java中存储在jira中的所有问题。 i try to use this code: 我尝试使用此代码:

for(String name:getProjectsNames()){
String jqlRequest = "project =  \""+name+"\"";

    SearchResult result = restClient.getSearchClient().searchJql(
            jqlRequest, 10000,0, pm);

    final Iterable<BasicIssue> issues = result.getIssues();
    for (BasicIssue is : issues) {
        Issue issue = restClient.getIssueClient().getIssue(is.getKey(), pm);
        ...........

    }

it give me the result but it take a very long time. 它给我结果,但是要花很长时间。 is there a query or a rest API URL or any other way that give me all issues? 是否有查询或其他API URL或任何其他方式给我所有问题? please help me 请帮我

The JIRA REST API will give you all the info from each issue at a rate of a few issues/second. JIRA REST API将以每秒几期的速度为您提供每期的所有信息。 The Inquisitor add-on at https://marketplace.atlassian.com/plugins/com.citrix.jira.inquisitor will give you thousands of issues per second but only the standard JIRA fields. https://marketplace.atlassian.com/plugins/com.citrix.jira.inquisitor上的Inquisitor加载项每秒将为您提供成千上万个问题,但仅提供标准JIRA字段。

There is one other way. 还有另一种方法。 There is one table in JIRA database named " dbo.jiraissue ". JIRA数据库中有一个名为“ dbo.jiraissue ”的表。 If you have access to that database then you can fetch all the ids of all issues. 如果您有权访问该数据库,则可以获取所有问题的所有ID。 After fetching this data you can send this REST request "**localhost/rest/api/2/issue/issue_id" and get JSON response. 提取此数据后,您可以发送此REST请求“ ** localhost / rest / api / 2 / issue / issue_id”并获取JSON响应。 Of course you have to write some code for this but this is one way I know to get all issues. 当然,您必须为此编写一些代码,但这是我知道解决所有问题的一种方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM