Is there a way to edit the maxResults for a JIRA filter?

Ben Wozniak July 7, 2015

I am using the JIRA filter's search URL and using the UrlFetchApp in Google Apps Scripts to retreive the JSON. However, my filter has more than 50 items and I see the maxResults always set to 50. I tried passing in maxResults as an option to the fetch but I still end up with only 50. Can I do something to the filter to get more than 50 items?

5 answers

0 votes
Ben Wozniak July 13, 2015

I found a simple fix. At the end of the search URL I was using I just added "&maxResults=1000" and it changed it.

Vinh Bao April 17, 2018

Hi Ben Wozniak,

That's great to see your faced issue similar to mine. Could you please share my how to add "&maxResults=1000" into you search URL?

 

I tried it and it still showing 50 rows returned.

My code below, can you please help me if possible to modify below

var jql = "?jql=issuetype in (subTaskIssueTypes(), Enhancement, Epic, Feature, 'Product Backlog Item', Story, Task, Bug) AND Labels = 2018 ORDER BY Rank ASC";
var resultJQL ="&maxResults=1000";
var httpResponse = UrlFetchApp.fetch(baseURL + jql + resultJQL, fetchArgs);

 

Thanks,

Vinh

Vinh Bao May 29, 2018

I added into my JIRA query &startAt=0&maxResults=100 and it works!

JIRA have a limitation to get return result only 100 rows to improve performance.

Sergio Lage March 15, 2019

I am using pagination and it is working fine. What sucks is that getting only 100 hundred results at a time take hours to finish grabbing the whole list of issues. Is there a way to configure Jira Cloud in other to get more than 100 results per page?

翟娜 April 19, 2019

Hi, Sergio Lage.

Could you please share me how to add pagination into the search URL?

Is that should be &page=1? But I have tried it. It doesn't work.

 

Thanks

Sergio Lage April 19, 2019

Hi Like,

 

First of all, you need to code a loop using the data load editor. 

Use startAt  as a variable and increment it on every page request  you do to grab a set of maxResults at each request. 

Execute the loop until you get all requests you want to.

If you are fine with data load editor and its debugging tool, it won't be a problem.

I hope this helps.

翟娜 April 19, 2019

Hi, Sergio Lage.

The answer that you provided helps me a lot. 

Thanks very much.

Like Sergio Lage likes this
0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 9, 2015

Can you link to the rest api that you are using and maybe I'll be able to just look it up for you? https://docs.atlassian.com/jira/REST/latest/

0 votes
Ben Wozniak July 9, 2015

I'm not using an API, I'm just using google scripts' UrlFetchApp to retrieve from the search URL then I am parsing the JSON. I was wondering if maybe I could edit the maxResults in the JIRA filter itself, or if there is a parameter I can pass in to change the maxResults.

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2015

If pagination is not allowed by the resource then you should probably raise a bug. :(

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2015

I think that JIRA has an upper limit of 50 inbuilt statically into it. I think that you will just have to paginate the API yourself to get all of the results.

Suggest an answer

Log in or Sign up to answer