Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get all Jira Issues for a specified Project

I am using Jira REST API to get all the Issues in Jira for a specific Project. I don't want to have maxResults=50, which is the default. I just want to retrieve all issues for the project. Here is my command:

{ my $result = `curl -D- -u $usernameData:$passwordData -X GET -H "Content-Type: application/json" "http://jira.alm.mentorg.com:8080/rest/api/2/search?jql=project=HDS&maxResults=1000&fields=summary"`;}

I set maxResults=1000 and if I remove it, it will be set by default to 50! I just want to get all the Issues without having to worry about the maxResults. Can anyone help me with that?

like image 519
Shereen Hussein Avatar asked Jul 07 '13 10:07

Shereen Hussein


People also ask

How do I find specific issues Jira?

Select Search in the navigation bar (or press / on your keyboard). Choose from recent items or type to search. Optionally, filter the search results by choosing a project or issue assignee. Select an item or continue to Advanced issue search (press enter on your keyboard).

Can we search issues across projects in Jira?

Search for issues For more complex searches across multiple projects, use the issue search function. In this example, we'll search for all unresolved issues assigned to you. Select Filters and click a filter or choose Advanced issue search. The search results refresh when you select new criteria.


1 Answers

  1. Set the maxResults to a ridiculously high value e.g. 5000
  2. Make an extra call just to fetch the total records quickly, without actually fetching any content

    http://jira.alm.mentorg.com:8080/rest/api/2/search?jql=project=HDS&maxResults=0

like image 82
Neo Avatar answered Oct 09 '22 02:10

Neo