Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Only return specific fields (filter the fields output) in IQL

Yuxuan Li
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 19, 2022

I am using Jira webhook to callback the issue created/updated, which requires me to write down a JQL to filter out some results.

 

When I check the log of the returned JSON, there are a lot of fields I don't need, e.g. 'status' and 'Jira id' are the only two fields I need to retrieve. 

 

I am wondering if I can filter out other fields to make the JQL much faster (Just like SELECT in SQL).

 

I believe Jira REST API supports this idea (e.g. there is a 'fields' parameter in search_issues method in Python Jira API), but I don't know if I can do that by JQL

2 answers

0 votes
Walter Buggenhout
Community Champion
July 20, 2022

Hi @Yuxuan Li and welcome to the Community!

No, JQL does not impact the fields it returns - it just executes a search commands that returns a list of issues.

In the Jira UI, you can select the columns displayed in the filters > advanced search screen. If you want to query via a webhook, you'll need to specify the columns/fields you want in your result in code somehow, but not through JQL.

Hope this clarifies!

0 votes
Damian
Contributor
July 20, 2022

Hi Yuxuan,

I don't believe there is a way to specify which fields are returned by JQL. The fields returned would be determined by the project's (or projects') field configuration. Optimising that may help slightly (i.e. remove unused fields).

I do think a "fields" web hook configuration option would be useful.

Alternatively, you could create an automation rule that sends the data in a customised format to your endpoint.

It's available in the free version of Jira Software Cloud too (though not sure if there are any limitations):

2022-07-20_15-23-50.png

Suggest an answer

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

Atlassian Community Events