The jira:jqlFunction
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 functions page for more information about the architecture of JQL functions.
Property | Type | Required | Description |
---|---|---|---|
key |
| Yes | A key for the module, which other modules can refer to. Must be unique within the manifest. Regex: |
name | string | Yes | The name of the custom function. Must be unique and different from the names of built-in JQL functions. In case of name collision, the built-in function will be called. |
operators | list | Yes | List of operators supported by the custom function. The following operators are available:
|
types | list | Yes | Types of fields the custom function can be used with. The following types are available:
|
arguments | Argument | List of arguments for the custom function. | |
function | string | Yes | A reference to the |
Property | Type | Required | Description |
---|---|---|---|
name |
| Yes | The name of the custom function argument. |
required | boolean | Yes | Whether or not the argument is required. |
1 2modules: jira:jqlFunction: - key: issuesWithText-function name: issuesWithText arguments: - name: text required: true types: - issue operators: - "in" - "not in" function: functionKey function: - key: functionKey handler: index.issuesWithText
1 2export const issuesWithText = async (args) => { console.log('Hello from issuesWithText()'); const { clause } = args; const { operator } = clause; const [text] = clause.arguments; const jqlFragment = `summary${operator === 'in' ? ' ~ ' : ' !~ '}'${text}'`; return { jql: jqlFragment }; };
Rate this page: