Forums

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

How to create a script runner filter using jira rest API

Farwa Shahid
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!
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
Contributor
April 20, 2023 edited

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
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events