Script to get all fields from a Jira Issue Filter

sdavidsen June 15, 2021

Hi everyone,

I am writing a Python script to process some data retrieved from a specific Jira filter.

Is it possible to use the script get all table entries from a Jira filter in any form? Ideally it would be similar to the HTML page generated when you "Export" the filter as an "HTML report". 

The ultimate goal is to use the script to generate a PDF of every entry in the filter, and their corresponding data columns.

I have tried using REST APIs to do this, but it did not return the data fields.

I am very new to everything web related. 

Any advice would be appreciated! 
Thank you!

1 answer

1 accepted

0 votes
Answer accepted
David Bakkers
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.
June 16, 2021

Hello @sdavidsen 

With the REST API, you cannot ask it to search for issues using one of the named filters that you have created and can use via the GUI. There is no "Search for issues using the filter called XYZ"

With the REST API, you search for issues using the Issue search endpoint and you define what to search for using Jira Query Language (JQL), and you also specify which fields to return with the search. In essence, you have to replicate the functionality of your filter XYZ in the REST API request.

If you want to see the underlying JQL of a particular filter, open your project, go to the Issues view, then click the Go to advanced search button. From the list of filters on the left, select the one you want and apply it.  Once applied, click the Switch to JQL button and you will see the raw JQL... this is what you can copy and paste into your REST API query as the JQL search. You then just add the specification of the fields that you want returned in the search.

sdavidsen June 16, 2021

Hi David,

That was exactly what I was looking for! I was trying to return the content of the filter by directly querying the filter. 

I am now querying the filter and returning the JQL statement, which I then use to search using the issue search endpoint.

Thank you for your help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events