The following custom JQL functions enable you to expand your search in Jira:
|Returns issues that have been commented by a currently logged in user within the specified time frame. To perform such search, you must have the "browse issues" rights.|
|Returns a list of issues that are parents of all issues inside the specified JQL query.|
issuesParents(project = ABC and Summary ~ 'Testing')
|The issuesSubtasks function returns a list of issues that are subtasks of all issues in the specified JQL query.|
issuesSubtasks(project = Products and status != Resolved)
Returns tickets that have linked issues which are in the specified status and that are linked with the specified linking type.
For example, you have a ticket A, and it's cloned by ticket B which is in progress. The following:
issue in linkedIssuesHasStatuses("In Progress", "clones")
will search for the tickets that
...and then it will display the tickets that this ticket B clones, in our case this is ticket A.
|Returns the users who are the members of a certain role inside the Jira project.|
transitionCount(Project, Status, Count, Operation)
|This JQL function enables you to get a list of tickets in the specified project (first parameter) that were in a certain status (second parameter), X amount of times (third parameter) with a certain operation (fourth parameter - possible options">", "<", "=", ">=", "<=", "<>").|
|This function returns a list of tickets for which the status was changed within the specified time frame (first parameter) to the specified status (second parameter). For example, "2h" would mean within the last 2 hours.|
|Returns a list of issues where the status was changed by the specified user (first parameter) to the specified status (second parameter).|
|Returns a list of issues that were transitioned by anyone from the specified group (first parameter) to the specified status (second parameter).|
|Returns the issues that have been commented by a particular user within the specified time frame, for example, within the last 5 hours. To perform such search, you must have "browse issues" rights.|
See example below
|Returns issues that contain issue keys of other issues in the specified field.|
relatedIssuesByQuery (query1, query2)
Allows to apply Query2 for the Query1 results.
It returns issues according to the following algorithm:
JQL 1 = "project = TEST and assignee = test"
relatedIssuesByQuery("project = TEST and assignee = test", "key = SELF_VALUE and AND \"Start Date\" > startOfDay()")
JQL 1 starts running inside the function and, for instance, will find the following tasks:
Then, it will perform the following calls and accumulate the results.
Example - finding user's commented tickets
The following example will help you find tickets where the Tester6 user commented anything within the last 5 hours.
- Go to Issues > Search for issues.
- If there are existing search criteria, click the New filter button to reset the search criteria.
If the basic search is shown instead of the advanced search, click Advanced.
Enter your JQL query. As you type, Jira will offer a list of "auto-complete" suggestions based on the context of your query. Note that the auto-complete suggestions only include the first 15 matches, displayed alphabetically, so you might want to enter more text if you can't find a match.
project = PRDT and issue in userCommentedIssues("Tester6", "5h")
- Press Enter or click
That's it. to run your query. Your search results will display in the issue navigator.