We're updating our terminology in Jira

'Issue' is changing to 'work item'. You might notice some inconsistencies while this big change takes place.

JQL keywords

We're updating terminology in Jira and changing 'issue' to 'work item'. As part of the change, there are no changes to existing JQL queries.

This page describes information about keywords that are used for advanced searching. A keyword in JQL is a word or phrase that does (or is) any of the following:

  • joins two or more clauses together to form a complex JQL query

  • alters the logic of one or more clauses

  • alters the logic of operators

  • has an explicit definition in a JQL query

  • performs a specific function that alters the results of a JQL query

AND

Used to combine multiple clauses, allowing you to refine your search.

Note that you can use parentheses to control the order in which clauses are executed.

Examples

  • Find all open work items in the "New office" project:

    project = "New office" and status = "open"
  • Find all open, urgent work items that are assigned to jsmith:

    status = open and priority = urgent and assignee = jsmith
  • Find all work items in a particular project that are not assigned to jsmith:

    project = JRA and assignee != jsmith
  • Find all work items for a specific release which consists of different version numbers across several projects:

    project in (JRA,CONF) and fixVersion = "3.14"
  • Find all work items where neither the Reporter nor the Assignee is Jack, Jill or John:

    reporter not in (Jack,Jill,John) and assignee not in (Jack,Jill,John)

OR

Used to combine multiple clauses, allowing you to expand your search.

Note that you can use parentheses to control the order in which clauses are executed.

(Note: also see IN, which can be a more convenient way to search for multiple values of a field.)

Examples

  • Find all work items that were created by either jsmith or jbrown:

    reporter = jsmith or reporter = jbrown
  • Find all work items that are overdue or where no due date is set:

    duedate < now() or duedate is empty

NOT

Used to negate individual clauses or a complex JQL query (a query made up of more than one clause) using parentheses, allowing you to refine your search.

(Note: also see NOT EQUALS ("!="), DOES NOT CONTAIN ("!~"), NOT IN and IS NOT.)

Examples

  • Find all work items that are assigned to any user except jsmith:

    not assignee = jsmith
  • Find all work items that were not created by either jsmith or jbrown:

    not (reporter = jsmith or reporter = jbrown)

EMPTY

Used to search for work items where a given field does not have a value. See also NULL.

Note that EMPTY can only be used with fields that support the IS and IS NOT operators. To see a field's supported operators, check the individual field reference.

Examples

  • Find all work items without a DueDate:

    duedate = empty

    or

    duedate is empty

NULL

Used to search for work items where a given field does not have a value. See also EMPTY.

Note that NULL can only be used with fields that support the IS and IS NOT operators. To see a field's supported operators, check the individual field reference.

Examples

  • Find all work items without a DueDate:

    duedate = null

    or

    duedate is null

ORDER BY

Used to specify the fields by whose values the search results will be sorted. This requirement needs to be placed at the end of the JQL query, otherwise the JQL will be invalid.

By default, the field's own sorting order will be used. You can override this by specifying ascending order ("asc") or descending order ("desc").

Examples

  • Find all work items without a DueDate, sorted by CreationDate:

    duedate = empty order by created
  • Find all work items without a DueDate, sorted by CreationDate, then by Priority (highest to lowest):

    duedate = empty order by created, priority desc
  • Find all work items without a DueDate, sorted by CreationDate, then by Priority (lowest to highest):

    duedate = empty order by created, priority asc

Ordering by Components or Versions will list the returned work items first by Project, and only then by the field's natural order (see JRA-31113).

 

Still need help?

The Atlassian Community is here for you.