Output not showing all the results that are fetched using JQL query

kdatta21 September 10, 2017

Hi All,

My requirement is to get all the jira tickets for a period of particular time for all jira users of our project using java code. I have used com.atlassian.jira.rest.client.api.JiraRestClient for this and it worked well but the only arises now is that all the jira tickets are not displayed only the ones that can fit in a page are displayed ie: only 50 but rest are displayed although the query is giving around 133 tickets. Please help .

Kind regards,
Kaushik

1 answer

1 accepted

2 votes
Answer accepted
MoroSystems Support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2017

hi Kaushnik, JIRA REST API services usually uses pagination by 50 by default. You can handle pagination. Check documentation and the section Pagination.

Martin

kdatta21 September 11, 2017

Hi Martin ,

Thanks for your active reply.
Can you please let me know what would be the java code to increase the default pagination .

My Code :
Promise<User> promise = client.getUserClient().getUser(JIRA_ADMIN_USERNAME);
            User user = promise.claim();

Promise<SearchResult> searchJqlPromise = client.getSearchClient().searchJql("project = Testproject)");

for (Issue issue : searchJqlPromise.claim().getIssues()) {
                System.out.println(issue.getSummary());}


Kind regards,
Kaushik

MoroSystems Support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 11, 2017

try to use this method

kdatta21 September 11, 2017

Thanks working fine

MoroSystems Support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 11, 2017

you're welcome, can you accept the answer, please?

Suggest an answer

Log in or Sign up to answer