Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

The development of Power JQL put on hold. Please subscribe to updates on the marketplace and stay tuned.


Additional and useful JQL functions to search issues using the power of regex expressions. 

...

Table of Contents

Regex expressions

A simple example of a regular expression is a (literal) string. For example, the "Hello World" regex matches the "Hello World" string.

"." (dot) is another example of a regular expression. A dot matches with any single character; it matches, for example , with "a" or "1". The following table lists contains several regular expressions and describes with which search query pattern they would match.

RegexMatches
this is textMatches exactly "this is text"
this\s+is\s+textMatches the word "this" followed by one or more whitespace characters followed by the word "is" followed by one or more whitespace characters followed by the word "text".
^\d+(.\d+)?

^ defines that the pattern of the search query must start with the beginning of a new line.

\d+ matches one or several digits.

The ? makes the statement in brackets optional.

. matches ".", brackets are used for grouping.

Matches for example with "5", "1.5" and "2.21".

For details please vistit visit https://regexone.com or https://www.regular-expressions.info/java.html

...

Search by text fields

FieldJQL
summary issue in powerIssue("summary", ".*")
descriptionissue in powerIssue("description", ".*")

Case example

Task JQL
Simple usage - find any issue with the word "amber" in the beginning of the Summary fieldissue in powerIssue("summary", "(amber).*")
Any issue from POWERJQL project, where summary or description contains "text1" or "text2" (case-insensitive)issue in powerIssue("project=POWERJQL", "summary, description", "(?i).*(text1 | text2).*")

Search by user fields

Field JQL
assigneeissue in powerIssue("assignee", "Jackson")
reporterissue in powerIssue("reporter", "Lucas")
creatorissue in powerIssue("creator", "Liam")

Case example

Task JQL
Any issue where assignee name contains "Michael" (case insensitive)issue in powerIssue("assignee", "(?i).*(Michael).*")

Search by date fields

To search by date field use pattern "yyyy/MM/dd HH:mm"

FieldJQL
createdissue in powerIssue("created", "2017.*")
updatedissue in powerIssue("updated", "2017/08/26.*")
due, duedateissue in powerIssue("due", "2017/08/26.*")
resolutiondateissue in powerIssue("resolutiondate", "2017/08.*")

Search by fixVersion, affectedVersion fields

FieldJQLNotes
fixVersionissue in powerIssue("fixVersion", ".(8\.5.).")to find all tickets with fix versions like 8.5.1, 8.5.2, 8.5.1.1 etc.
affectedVersionissue in powerIssue("affectedVersion", ".(1\.0.).")to find all tickets with affected versions like 1.0.1, 1.0.2, 1.0.1.1 etc.

Search by sprint

SprintJQL
Any issue where sprint name contains "sample" (case-insensitive)issue in powerIssue("sprint", "(?i).*(sample).*")

Search by components field

...

Expand
titleScreenshot

Case example

Any not resolved issues where any component contains words "mobile" or "dev" in any part of component name (case-sensitive):

component in powerComponent("resolution=EMPTY", ".*(mobile | dev).*")

...

"powerWorklog" JQL function

This function allows to filter filtering tickets based on three keywords: comment, total, count. All these keywords filter from worklogs.

...

Expand
titleCase 2


Search by total

This keyword, The keyword "total" , allows filtering based on worked time. In order to get result(s), incorporate comparison signs( > , < , != , = ) and letters ( w=week , d=day , h=hour , m=minute).

...

Expand
titleCase 2


Search by count

This The keyword , "count" , allows filtering based on number logged worklog. In order to get result(s), incorporate comparison signs( > , < , != , = ).

...

"powerHistory" JQL function

issue in powerHistory("some JQL", "fieldname", "regex expression")
issue in powerHistory("fieldname", "regex expression")
Expand
titleScreenshot

Case example:

...

"powerUser" JQL function

assignee in powerUser("fieldname", "regex expression")

Allowed fields:

  • username,
  • displayName,
  • email,
  • preference

...

Find all the tickets where assignee has German locale location in User Preferences:

assignee in powerUser("preference=jira.user.locale","de.*")

Find all the tickets created by a users user which user names username starts with "andr":

creator in powerUser("username","andr.*")

Find all the tickets where Reporter's display name contains "john" case-insensitive ("(?i)" search modifier):

...

CaseJQLNotes
1
issue in mentionedWithoutResponse("JQL subquery")

to get all tickets where the current user has been mentioned but without response

2
issue in mentionedWithoutResponse("JQL subquery", "userName")
to get all tickets where "userName" has been mentioned but without response:
3issue in mentionedWithoutResponse("JQL subquery""currentUser()")to get all tickets where current logged in user has been mentioned without response

...