---
title: "Using JQL functions"
canonical: "https://support.appfire.com/space/UTIL/18415737/Using%20JQL%20functions"
format: markdown
---
> Macro (aura-html)

The following custom JQL functions enable you to expand your search in Jira:

- [commentedIssues](#Using-JQL-functions-commentedIssues)
- [issuesParents](#Using-JQL-functions-issuesParents)
- [issuesSubtasks](#Using-JQL-functions-issuesSubtasks)
- [linkedIssuesHasStatuses](#Using-JQL-functions-linkedIssuesHasStatuses)
- [membersOfProjectRole](#Using-JQL-functions-membersOfProjectRole)
- [transitionCount](#Using-JQL-functions-transitionCount)
- [transitionDate](#Using-JQL-functions-transitionDate)
- [transitionReporter](#Using-JQL-functions-transitionReporter)
- [transitionReporterGroup](#Using-JQL-functions-transitionReporterGroup)
- [userCommentedIssues](#Using-JQL-functions-userCommentedIssues)
- [groupCommentedIssues](#Using-JQL-functions-groupCommentedIssues)
- [relatedIssuesByField](#Using-JQL-functions-relatedIssuesByField)
- [relatedIssuesByQuery](#Using-JQL-functions-relatedIssuesByQuery)

## JQL functions

> ℹ️ JQL functions can return large result sets that may affect Jira performance. We recommend that you [configure](https://appfire.atlassian.net/wiki/spaces/UTIL/pages/18415817) these functions so that your Jira performance is not affected.

| **JQL functions** | **Description** | **Examples** |
| --- | --- | --- |
| ### commentedIssues(<span style="color: #0000ff">timeframe</span>) | Returns issues that have been commented by the **currently logged in** user within the specified time frame. Requires "browse issues" permissions. | - issue in commentedIssues("5h")
- issue in commentedIssues("startOfWeek")
- issue in commentedIssues("startOfDay") |
| ### issuesParents(<span style="color: #0000ff">JQL query</span>) | Returns a list of issues that are parents of all issues in the specified JQL query. | issue in issuesParents("Project = PRDT") |
| ### issuesSubtasks(<span style="color: #0000ff">JQL query</span>) | Returns a list of issues that are subtasks of all issues in the specified JQL query. | issue in issuesSubtasks("Project = PRDT") |
| ### linkedIssuesHasStatuses(<span style="color: #0000ff">Status, linkingType</span>) | Returns tickets that have linked issues in the specified status, linked with the specified linking type. For example, if ticket A is **cloned** by ticket B which is **In Progress**, then linkedIssuesHasStatuses("In Progress", "clones") finds the tickets cloned by issues in that status. | - issue in linkedIssuesHasStatuses("In Progress")
- issue in linkedIssuesHasStatuses("In Progress", "To Do", "clones")
- Special JQL: **areNotBlocked()** = linkedIssuesHasStatuses("Open", "Reopened", "In Progress", "is blocked by") |
| ### membersOfProjectRole(<span style="color: #0000ff">Group</span>) | Returns the users who are members of a specified role in a Jira project. | - assignee in membersOfProjectRole("AAA", "Administrators")
- assignee in membersOfProjectRole("IOS", "iOS Developers")
- assignee in membersOfProjectRole("HELP", "Support team members") |
| ### transitionCount(<span style="color: #0000ff">Project, Status, Count, Operation</span>) | Returns tickets in the specified project that were in a given status a specified number of times, using a comparison operator (">", "<", "=", ">=", "<=", "<>"). | - issue in transitionCount(SP, "Done", 4, "<") — finds issues that entered 'Done' status fewer than 4 times |
| ### transitionDate(<span style="color: #0000ff">Duration, Status</span>) | Returns tickets whose status changed within the specified time frame to the specified status. For example, "2h" means within the last 2 hours. | - transitionDate(2d, Closed) |
| ### transitionReporter(<span style="color: #0000ff">User, Status, Project</span>) | Returns issues where the status was changed by the specified user to the specified status within the specified project (optional). | - transitionReporter(Admin, Resolved, PROD) |
| ### transitionReporterGroup(<span style="color: #0000ff">Group, Status, Project</span>) | Returns issues transitioned by anyone in the specified group to the specified status within the specified project (optional). | - transitionReporterGroup(Administrators, Resolved, PROD) |
| ### userCommentedIssues(<span style="color: #0000ff">User, Duration</span>) | Returns issues commented by a **specific** user within the specified time frame. Requires "browse issues" permissions. | - issue in userCommentedIssues("admin", "5h")
- issue in userCommentedIssues("user", "startOfWeek")
- issue in userCommentedIssues("admin", "startOfMonth")
- issue in userCommentedIssues("admin", "year") |
| ### groupCommentedIssues(<span style="color: #0000ff">User, Duration</span>) | Returns issues commented by a **specific** group within the specified time frame. Requires "browse issues" permissions. | - issue in groupCommentedIssues("admin", "startOfYear")
- issue in groupCommentedIssues("admin", "startOfMonth")
- issue in groupCommentedIssues("admin", "week") |
| ### relatedIssuesByField(<span style="color: #0000ff">query, customFieldId</span>) | Returns issues that contain issue keys of other issues in the specified field. | - issue in relatedIssuesByField("project = Products and status != Resolved","customfield_10909") |
| ### relatedIssuesByQuery (<span style="color: #0000ff">query1, query2</span>) | Applies Query2 to each result of Query1 using the SELF_VALUE placeholder, which is substituted with each Query1 issue key in turn.<br>1. Query1 runs and returns a list of results.
2. Query2 is applied to each result, substituting SELF_VALUE with the issue key.
3. The accumulated results are returned. | relatedIssuesByQuery("project = TEST and assignee = test", "key = SELF_VALUE and \"Start Date\" > startOfDay()") |

## Examples

### Finding a user's commented tickets

The following example finds tickets where **Tester6** commented within the last **5 hours**.

1. Go to **Issues** > **Search for issues**.
  - If there are existing search criteria, click **New filter** to reset.
  - If basic search is shown, click **Advanced**.
2. Enter your JQL query, for example:
  project = PRDT and issue in userCommentedIssues("Tester6", "5h")
3. Press Enter to run the query. Results display in the issue navigator.  
> Macro (inline-media-image)

### Configuring a JQL function to prevent performance issues

The following example shows how to handle a JQL function that returns too many results.

1. Go to **Issues > Search for issues**.
2. Enter your JQL query, for example: **issuekey in issuesParents("project=TP")**.
3. If results are too large, Jira returns an error indicating a performance risk.  
> Macro (inline-media-image)
4. Ask your Jira Administrator to configure JQL functions to allow a higher limit.
5. Re-enter your JQL query.> Macro (inline-media-image)

Depending on your Jira environment, increasing the limit may not always be possible. In that case, refine the JQL query to return a smaller result set.