Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to increase maxResults when using JQL in JRIC?

Muthukumar Narayanaswamy April 3, 2012

I'm using JRIC and when i use JQL to search issues, it restricts to only 50 results.

How do i increase it to return everything? If that is not possible, can i set the startat? So the second time I can search from 50 for the next 50 issues.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Jobin Kuruvilla [Adaptavist]
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.
April 3, 2012

Do you mean JRJC? If so, you can pass maxResults and startAt as 2 parameters. See SearchRestClient java docs.

Muthukumar Narayanaswamy April 3, 2012

Thanks Jobin for getting back, that helped. Is there a way to get all the results and not be restricted by maxResults?

Thanks,

-Muthu

Jobin Kuruvilla [Adaptavist]
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.
April 3, 2012

Use the same method without maxResults and startAt ?

Muthukumar Narayanaswamy April 3, 2012

When i use the method without maxResults and startAt, it get only the first 50. So looks like maxResults has a default value of 50.

Thanks,

-Muthu

Jobin Kuruvilla [Adaptavist]
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.
April 3, 2012

I see. You might want to use a much bigger value (10000 or something) so that you will get all the results in one go. Same thing was suggested for SOAP API last week on a similar question.

Muthukumar Narayanaswamy April 3, 2012

That was quick. Thanks Jobin. I have 2 options and want your opinion on it.

1. Since there is no way to know how many issues the search will return, i will use the "total" returned by the API to perform further calls to retrive the rest.

2. Make the first search with maxResults=1 and startat=0. The total atribute in SearchResult will tell me how many records exist. So make one call with maxresults set to searchResult.getTotal().

Appreciate your timely help.

Thanks,

-Muthu

Jobin Kuruvilla [Adaptavist]
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.
April 3, 2012

Both needs multiple calls. I would still go for a single call with a higher maxResults value!

TAGS
AUG Leaders

Atlassian Community Events