More for JQL

More for JQL, as the name shows, it tries to extend the default JQLs, and give more exciting features to make your search, your gadget in dashboard and in your report more efficient and easy

Epic

All the Epic related JQL is the implemented by issue function, the usage is like this:

issue in [keyword]

And each key word contains one argument, and the argument can be another JQL statement, for example:

issue in epic.getChildIssueFromEpic(“text ~ Train”)

The argument of the issue function is “text ~ Train” is a JQL, and note the argument is included by adding double quote. You can feel free to use your own JQL, for example “status = open”, means find all Child issue whose Epic issue’s status is open.

Note that if the embedded SQL like “text ~ Train” requires a double quote inside, for example it is like this:

“status=”In Progress””, we recommend you to use issue in epic.getChildIssueFromEpic(“status=’In Progress'”), the idea is to use single quote to embrace the word which contains the space character.

Let’s look at all supported key word with its example, and the detailed description.

JQL key wordExampleDescription
issue in epic.getChildIssueFromEpic issue in epic.getChildIssueFromEpic(“text ~ Train”)This is to fetch all child issues whose parent Epic issue contain text “Train” in summary or description.
issue in epic.getEpicFromChildIssueissue in epic.getEpicFromChildIssue(“text ~ Kid”)This is to fetch all Epic issues whose sub child issue contains text “Kid” in summary of description.

Subtask

All the Attachment related JQL is the implemented by issue function, the usage is like this:

issue in [keyword]

For example, we can list out all subtasks of two or more stories when managing projects or export the list if needed using Jira filter export feature. For example:

issue in subtask.getSubtaskFromParent(“key in(STORY-1,STORY-2”)

Note that if the sub searching condition needs to have double quote as it contains the space in the string, we can use single quote instead to distinguish with outside double quote. For instance:

issue in subtask.getParentFromSubtask(“status=’To Do'”)

Since the “To Do” status contains the space character, so using single quote inside the embedded JQL will help.

JQL key wordExampleDescription
issue in subtask.getParentFromSubtaskissue in subtask.getParentFromSubtask(“status=blocked”)To find other all parents issue by searching conditions of subtasks, in the example, it will list the parent issue of sub task issues whose status is blocked
issue in subtask.getSubtaskFromParentissue in subtask.getSubtaskFromParent(“key in(STORY-1,STORY-2”)The find out all subtasks, and the parent issues is EPIC and EPIC2, or we can understand to list all subtasks under STORY-1 and STORY-2

Attachment

All the Attachment related JQL is the implemented by issue function, the usage is like this:

issue in [keyword]

For example, you want to search out the issues whose attachments file name contains “icon” in it. The file name of the attachment can be “icon.jpg” or “test_icon.word” etc

issue in attachment.name(“icon”)

Let’s look at all supported key word with its example, and the detailed description.

JQL key wordExampleDescription
issue in attachment.nameissue in attachment.name(“icon”)This is a regex search instead of the exact search, means, it will search out the file names who contain “icon” in the example, it can be “icon.jpg” or “my-icon.png” etc.
issue > or <,<=,>=,= attachment.sizeissue > attachment.size(“1m”)The operator can be >, >=, <=,<= and =.
The argument can be [number+M/K/G],
note that m/k/g is case sensitive. For example you want to check file less than 5k
issue <= attachment.size(“5K”)
issue in attachment.countissue in attachment.count(“5”)Issues who have 5 attachments

Link

All the Link related JQL is the implemented by issue function, the usage is like this:

issue in [keyword]

One example of link is:

issue in link.linkedType(“blocks”, “status=’To Do'”)

The above JQL will find the issues with the condition in the second arguments first, then get the final issues which the “previously found issue” blocks to. In above example, it will first find our all issues whose status is “To Do”, using these found issues, find the result these issues blocks to. In the example, since there are already double quote of the argument, so the status will be appended single quote around it as it has a space in word “To Do”.

JQL key wordExampleDescription
issue in link.linkedType issue in link.linkedType(“blocks”, “text ~ icon”)This is to find our the issues who is blocked by the issues whose summary or description contains “icon” word in it.

User

All the User related JQL is the implemented by issue function, the usage is like this:

issue in [keyword]

One example of link is:

issue in user.lastUpdatedBy(“Come2Solution”)

The above JQL will find out all issues which were lastly updated by the user whose display name is “Come2Solution”, or you can pass email of the user instead of the displayname.

JQL key wordExampleDescription
issue in user.lastUpdatedByissue in user.lastUpdatedBy(“[email protected]”)The argument can be user’s display name or email.
And lastUpdated means the person who is the last one to update the issues