Due to the infrastructure of Jira Cloud, ScriptRunner functions cannot be accessed in Jira Query Language (JQL) queries in Issue Search and Jira Dashboards directly. To use ScriptRunner functions in queries, users must use ScriptRunner’s Enhanced Search feature. Here, users create a filter with the ScriptRunner function included, then save it, allowing it to be used across Jira in projects, reports, and Dashboards. You can use your filters in any Custom Charts for Jira gadgets, including Simple Search and Issue List.
To configure Enhanced Search filters, then use them in our gadgets, follow the steps below.
Jump to a Topic
Step 1: Build out the filter in Enhanced Search
In the Jira header, click Apps-->ScriptRunner Enhanced Search
In Enhanced Search, begin typing in your JQL query in the search bar. You can use ScriptRunner functions in the query
If you click the + in the search bar, you can access a list of available ScriptRunner functions for your query
Once you’ve written your JQL query, click Save as Filter
In the dialog box that appears:
Name the filter
Turn the Sync Filter toggle on
Optional: If you want any user to be able to pull the filter into boards and Dashboards, turn the Share with all toggle on
Optional: If you want to restrict filter access to specific projects and/or Jira groups, select them in the Choose Projects and/or the Choose Groups drop downs
Click Save
Once the Enhanced Search Filter has been and synced, it will appear in any list of Filters in Jira.
Step 2: Use Enhanced Search filter in Custom Charts gadgets
Source Dropdown
This is applicable across all of our gadgets, including Custom Charts, Issue List, and Simple Search
Navigate to the Source dropdown
Configure the gadget to use the filter in the following settings:
Source
Select Saved filters from the dropdown
Click into the filter search bar, and begin typing in the name of your filter. Once it appears in the list, select it. This sets the Enhanced Search Filter as the gadget’s Source
Chart By/Group By settings
This is applicable for the Custom Charts gadget only, as Issue List and Simple Search do not have these dropdowns
In the Chart by or Group by dropdown, select Saved filters
Navigate to the Chart By tab or Group By tab on the right side of the gadget
Click into the box that says “Search for saved filters…” and select your filter
Click Save at the bottom right of the gadget to lock in the configuration and you’re all set!
Simple Search Fields
This is applicable in Simple Search only, as Issue List and Custom Charts do not have Simple Search fields
In the right side of Simple Search, navigate to the Simple Search Fields section, then click + Add saved filter toggle
Click into the saved filter dropdown and select the Enhanced Search filter from the list
Click Save at the bottom right of the gadget to lock in the configuration and you’re all set!
Issue List Quick Filters
This is applicable in Issue List in Jira Cloud only, as Simple Search and Custom Charts do not have Quick Filters
In the right side of Issue List, navigate to the Quick Filters section, then click + Add saved filter toggle
Click into the saved filter dropdown and select the Enhanced Search filter from the list
Click Save at the bottom right of the gadget to lock in the configuration and you’re all set!