JQL Functions
- Małgorzata Wierzgała (Unlicensed)
- Artur Karpiński
- Paweł Darmofalski (Unlicensed)
List of JQL Functions:
linkedIssuesFromFilter()
Finds all issues which are linked by specified relation with those found by saved filter. When relationDirection is provided then relation should also be provided.
When recursionNumber is specified then issues linked to found linked issues are also considered as a result.
Since version 2.10.0 we added relationDescription handling in queries.
Parameters:
- filter - could be given by name or its id.
- relation - is optional and given by name (about relation parameter more information in FAQ section), name of relation (or relation description) must match names that are set in configuration, by default they start with capital letter see more
- relationDescription avilable since version 2.10.0 (about relation description parameter more information in FAQ section), must match descriptions that are set in configuration, see more
- relationDirection - optional, have values inward or outward (do not provide if you choose direction by relation description)
- recursionNumber - optional, have positive integer values (not supported with relation description parameter)
Syntax:
linkedIssuesFromFilter(filter) linkedIssuesFromFilter(filter, relation) linkedIssuesFromFilter(filter, relation, relationDirection) linkedIssuesFromFilter(filter, relation, relationDirection, recursionNumber) linkedIssuesFromFilter(filter, relationDescription)
Examples:
issue in linkedIssuesFromFilter("myFilter")
issue in linkedIssuesFromFilter("myFilter", "Duplicate")
issue in linkedIssuesFromFilter("myFilter", "Duplicate", "inward") issue in linkedIssuesFromFilter("myFilter", "is duplicated by")
issue in linkedIssuesFromFilter("myFilter", "Duplicate", "outward") issue in linkedIssuesFromFilter("myFilter", "duplicates")
issue in linkedIssuesFromFilter("102010")
linkedIssuesFromQuery()
Finds all issues which are linked by specified relation with those found by JQL. When relationDirection is provided then relation should also be provided.
When recursionNumber is specified then issues linked to found linked issues are also considered as a result.
Since version 2.10.0 we added relationDescription handling in queries.
Parameters:
- JQL- could be given by JQL query
- relation - is optional and given by name (about relation parameter more information in FAQ section), name of relation (or relation description) must match names that are set in configuration, by default they start with capital letter see more
- relationDescription avilable since version 2.10.0 (about relation description parameter more information in FAQ section), must match descriptions that are set in configuration, see more
- relationDirection - optional, have values inward or outward (do not provide if you choose direction by relation description)
- recursionNumber - optional, have positive integer values (not supported with relation description parameter)
Syntax:
linkedIssuesFromQuery(JQL) linkedIssuesFromQuery(JQL, relation) linkedIssuesFromQuery(JQL, relation, relationDirection) linkedIssuesFromQuery(JQL, relation, relationDirection, recursionNumber) linkedIssuesFromQuery(JQL, relationDescription)
Examples:
issue in linkedIssuesFromQuery("project = DEMO AND issuetype = BUG")
issue in linkedIssuesFromQuery("issuekey >= X", "Blocks")
issue in linkedIssuesFromQuery("project = DEMO AND issuetype = BUG", "Blocks", "inward") issue in linkedIssuesFromQuery("project = DEMO AND issuetype = BUG", "is blocked by")
issue in linkedIssuesFromQuery("project = DEMO AND issuetype = BUG", "Blocks", "outward") issue in linkedIssuesFromQuery("project = DEMO AND issuetype = BUG", "blocks")
issue in linkedIssuesFromQuery("issuekey = X", "Blocks", "inward", 2)
issue in linkedIssuesFromQuery("issuekey = DEMO-1", "Cloners", inward, 2)
issue in linkedIssuesFromQuery("issuekey = DEMO-1", "Duplicate", inward, 3)
issue in linkedIssuesFromQuery("issuekey = DEMO-1", "Any", "both", 3)
parentIssuesFromFilter()
Finds all issues which are parents of subtasks issues selected by specified saved filter.
Parameters:
- filter - could be given by name or its id.
Syntax:
parentIssuesFromFilter(filter)
Examples:
issue in parentIssuesFromFilter("myFilter")
issue in parentIssuesFromFilter("102010")
parentIssuesFromQuery()
Finds all issues which are parents of subtasks issues selected by JQL.
Parameters:
- JQL- could be given by JQL query
Syntax:
parentIssuesFromQuery(JQL)
Examples:
issue in parentIssuesFromQuery("project = DEMO AND issuetype = Sub-Task")
subtaskIssuesFromFilter()
Finds all issues which are subtasks of issues selected by specified saved filter
Parameters:
- filter - could be given by name or its id.
Syntax:
subtaskIssuesFromFilter(filter)
Examples:
issue in subtaskIssuesFromFilter("myFilter")
issue in subtaskIssuesFromFilter("102010")
subtaskIssuesFromQuery()
Finds all issues which are subtasks of issues selected by JQL
Parameters:
JQL- could be given by JQL query
Syntax:
subtaskIssuesFromQuery(JQL)
Examples:
issue in subtaskIssuesFromQuery("project = DEMO AND issuetype = Task")
numberOfLinkedIssuesFromQuery()
This function is available in 2.5.0 plugin version and later.
Finds all issues which number of linked issue meet a condition. Relation type and direction is not analyse by function so all linked issues are proceeded to check condition. Query has three required parameters.
Parameters:
- JQL- JQL query to analyse.
- mathematicalSymbol- available symbols ==, <=, !=, >=, >, <
- numberOfLinkedIssues- number of linked issues
Syntax:
numberOfLinkedIssuesFromQuery(JQL, mathematicalSymbol, numberOfLinkedIssues)
Examples:
issue in linkedIssuesFromQuery("project = DEMO",">","2")
numberOfLinkedIssuesFromFilter()
This function is available in 2.5.0 plugin version and later.
Finds all issues which number of linked issue meet a condition. Relation type and direction is not analyse by function so all linked issues are proceeded to check condition. Query has three required parameters.
Parameters:
- filter - could be given by name or its id.
- mathematicalSymbol- available symbols ==, <=, !=, >=, >, <
- numberOfLinkedIssues- number of linked issues
Syntax:
numberOfLinkedIssuesFromQuery(filter, mathematicalSymbol, numberOfLinkedIssues)
Examples:
issue in linkedIssuesFromQuery("myFilter","<","3")
issue in linkedIssuesFromQuery("102011","==","1")
having...()
This function is available in 2.4.0 plugin version and later.
Since version 2.10.0 we added relationDescription handling in queries.
having...
counterparts:havingLinkedIssuesFromQuery(...)
,
havingLinkedIssuesFromFilter(...)
,
havingSubtaskIssuesFromQuery(...)
,
havingSubtaskIssuesFromFilter(...)
,
havingParentIssuesFromQuery(...)
,
havingParentIssuesFromFilter(...)
.
havingXXXX("subquery")
is equivalent to: reversedXXX("") and subquery
, (where ""
is a subquery which matches all the issues). issue in havingSubtaskIssuesFromQuery("text ~ linux")
returns those issues which are parents of some subtask issues, and contain linux
text somewhere. This is equivalent to (but faster than) this query:
issue in parentIssuesFromQuery("") and text ~ linux
Note that this is not the same as query:
issue in parentIssuesFromQuery("text ~ linux")
which returns parent issues of subtask issues containing linux (returned parents themselves don't have to contain linux
).
having...
queries work.epicsFromFilter()
This function is available in 2.9.0 version plugin version and later.
This function is available only with JIRA Software.
Function will return all Epics that where assigned to issues returned by given filter parameter.
Function allows you to discover all Epics that where used in your issue set. In this case issue set is defined as filter.
Parameters:
- filter - could be given by name or its id.
Syntax:
epicsFromFilter(filter)
Examples:
issue in epicsFromFilter("testowy")
epicsFromQuery()
This function is available in 2.9.0 version plugin version and later.
This function is available only with JIRA Software.
Function will return all Epics that where assigned to issues returned by given query parameter.
Function allows you to discover all Epics that where used in your issue set. In this case issue set is defined as query.
Parameters:
- JQL- could be given by JQL query
Syntax:
epicsFromQuery(JQL)
Examples:
issue in epicsFromQuery("project = TEST")
epicsWithIssue()
This function is available in 2.9.0 version plugin version and later.
This function is available only with JIRA Software.
Function will returned all Epics that have at least one issue assigned. Function will search for all Epics in your JIRA instance.
Parameters: no
Syntax:
epicsWithIssue()
Examples:
issue in epicsWithIssue()
epicsWithoutIssue()
This function is available in 2.9.0 version plugin version and later.
This function is available only with JIRA Software.
Function will returned all Epics that have no issues assigned. Function will check all Epics in your JIRA instance.
Parameters: no
Syntax:
epicsWithoutIssue()
Example:
issue in epicsWithoutIssue()