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
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!
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):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.