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

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

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.

0 votes

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

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

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/

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

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

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

433 views 7 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you