What are ScriptRunner JQL Functions?
Use ScriptRunner JQL functions to extend Jira's built-in capabilities, allowing you to conduct more granular searches, and obtain more detailed information about what is happening in your instance and projects.
How to use ScriptRunner JQL Functions
There are two ways to use ScriptRunner JQL functions:
- Use one of our 40+ out-of-the-box ScriptRunner JQL functions (available to all users).
- Create custom JQL functions using Groovy without having to learn the Atlassian SDK (administrators only).
You can use ScriptRunner JQL functions anywhere you are able to use Jira JQL functions. These include: as part of a JQL search in the Jira Issue Navigator (Advanced and Basic view), in gadgets, or within your own custom scripts.
Below are just some examples of how you can use ScriptRunner JQL functions:
- Use epicsOf to query on epic links, such as finding all epics that have unresolved stories.
Use issuesInEpics to find all stories for open epics in a project, and then look specifically at the status of issues, such as ‘in progress.’
- Use linkedIssuesOf to return linked issues, such as all unresolved issues that are blocked by open issues.
- Use parentsOf to return the parents of issues that you specify in a subquery.
- Use hasLinkType to see which issues which are blockers in a project.
Using ScriptRunner JQL Functions in the Issue Navigator (all users)
Issue Navigator Basic view
You can use JQL functions in the Basic view of the issue navigator. To access ScriptRunner JQL functions:
- Click the More drop-down option, then issueFunction.
- Click Add Function.
The Add ScriptRunner JQL Function dialog appears.
- Start typing a search, or scroll through the on-screen options, and select the JQL function you require from the Function drop-down.
The Add ScriptRunner JQL Function screen updates to show all required fields for the selected function.
- Fill in all required fields and click Add Function.
You can add multiple ScriptRunner JQL functions in the Basic view. When multiple functions are added they use the AND operator.
You can switch freely between the Basic and Advanced views.
Issue Navigator Advanced view
Use JQL functions in the Advanced view of the issue navigator. JQL functions that operate on issues are used by entering
issueFunction in or
issueFunction not in, and then the function name.
The drop-down shows suggestions along with any required or optional arguments.
See all Configured Functions (administrator users)
Find JQL Functions within ScriptRunner in the Administration area by clicking the JQL Functions tab. Alternatively, click JQL Functions from the left-hand menu.
The JQL Function page displays a list of all available ScriptRunner JQL functions registered and enabled on your instance, along with performance and execution history.