issuesFromJQL()

This function returns the issue list of issues returned by the specified JQL query. Visibility restrictions (permissions and issue security) might apply. By default this query will be run as the current user.


We suggest using this function for performance reasons when the number of issues to be retrieved or filtered is very high (e.g. all issues in a project or in status) instead of functions like:


Bash
issuesFromJQL(jqlQuery) #Output: Issue list


Examples

Parser expression

Description

Bash
issuesFromJQL("status in (Open, Done)")

This example returns an issue list with all issues that are in status "Open" or "Done".

Bash
issuesFromJQL("'Story points' is not empty")

This example returns an issue list with all issues that do have Story points.

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

jqlQuery

text

Any valid JQL Query.

 Double quotation marks in JQL have to be replaced with single quotation marks, e.g.:

Usually JQL would look like

"Epic Link" is not empty

Using it within issuesFromJQL()

'Epic Link' is not empty

Output

This function returns an issue list .

If the JQL query  does not return a result, the function returns an empty issue list .


Variant where you additionally can specify a user which will execute the JQL query.


Bash
issuesFromJQL(jqlQuery, userName) #Output: Issue list


Examples

Parser expression

Description

Bash
issuesFromJQL("status in (Open, Done)",%{issue.reporter))

This example returns an issue list with all issues that are in status "Open" or "Done" that are visible for the reporter of the given issue.

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

jqlQuery

text

Any valid JQL Query.

 Double quotation marks in JQL have to be replaced with single quotation marks, e.g.:

Usually JQL would look like

"Epic Link" is not empty

Using it within issuesFromJQL()

'Epic Link' is not empty

userName

text

Text containing a valid user name.

Output

This function returns an issue list

If the JQL query does not return a result, the function returns an empty issue list


📚 Use cases and examples