Framework overview
Building blocks
Design guidelines
Security for Connect apps
Modules
JavaScript API
Last updated Sep 12, 2025

Atlassian timeline for ending Connect support

JQL Functions

The JQL function module allows your app to define custom JQL functions which appear built-in from the user's perspective. This means that they're visible in the query editor and show up in the autocomplete dropdown.

See the JQL search extensibility page for more information about the architecture of JQL functions.

Example

1
2
{
  "modules": {
    "jiraJqlFunctions": [
      {
        "name": "subquery",
        "arguments": [
          {
            "name": "query",
            "required": true
          },
          {
            "name": "offset",
            "required": false
          }
        ],
        "types": [
          "issue"
        ],
        "operators": [
          "in",
          "not_in"
        ],
        "url": "/compute-function",
        "key": "subquery-jql-function"
      }
    ]
  }
}

Properties

arguments

Type[JQL Function argument, ...]
RequiredYes
Description

The list of arguments that the function accepts.

key

Type
string
Max length
100
Required
Yes
Pattern
^[a-zA-Z0-9-]+$
Description

A key to identify this module.

This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique.

Keys must only contain alphanumeric characters and dashes.

The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key.

Example

For example, an add-on which looks like:

1
2
{
    "key": "my-addon",
    "modules": {
        "configurePage": {
            "key": "configure-me",
        }
    }
}

Will have a configuration page module with a URL of /plugins/servlet/ac/my-addon/configure-me.

name

Typestring
RequiredYes
Description

The name of the function.

operators

Type[string,...]
RequiredYes
Description

The list of operators the function can be used with.

types

Type[string,...]
RequiredYes
Description

The list of field types the function can be used with.

url

Typestring
Formaturi-template
RequiredYes
Description

The relative URL of the endpoint in the app that will be called by Jira to compute the function result.

Argument format

The argument sent to the endpoint has the following format:

1
2
 {
   "precomputationId": ""
   "clause": {
     "field": "field name",
     "type": [
       "field type"
     ],
     "operator": "operator",
     "function": "function name",
     "arguments": {
       "value"
     }
   }
 }

Response format

The endpoint is expected to return the result in the following format:

1
2
 {
   "jql": "JQL fragment to use in place of the function clause"
 }

Error message

1
2
 {
   "error": "Error message that will be displayed on the UI"
 }

Rate this page: