How to create a script runner filter using jira rest API

Farwa Shahid April 19, 2023

I've to create a filter containing issueFunction field, using rest API.
I can create such filter manually in browser using below JQL

'issueFunction in issueFieldMatch("project = TEST", "labels", "test_label")'

but while trying with create filter API, I get

Field 'issueFunction' does not exist or you do not have permission to view it.

on running the same JQL in Jira navigator I get
The "issueFieldMatch" JQL function provided by "Adaptavist Scriptrunner" for Jira Server works differently in Jira Cloud. Run it directly in "Enhanced Search" instead. 
Do create filter API only works with normal fields ? Or is there any way I can use issueFunction with create filter API ?

1 answer

1 accepted

1 vote
Answer accepted
Josué Garcia April 20, 2023

So in the cloud, you need to think of ScriptRunner and and JIRA Software as two sperate applications. All issueFunctions belong to ScriptRunner, therefore you cannot request to these through the JIRA API.

Last I checked there is no direct API to ScriptRunner unfortunately. Something you can request from adaptavist I guess.

The only workaround I can think of is to create the filter in Apps -> ScriptRunner Enhanced Search. The export this at a JIRA filter. Then from here you can make API calls to the JIRA filter.

Suggest an answer

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

Atlassian Community Events