JIRA Query Language (JQL) is a powerful tool for searching and filtering issues in JIRA. Here are some tips to help you get the most out of JQL:
Use Keywords: JQL supports keywords such as project, issuetype, status, assignee, reporter, priority, and more. Start your queries with these keywords to narrow down your search criteria.
- Combine Criteria: You can combine multiple criteria in a single query using logical operators such as AND, OR, and NOT. For example, project = "Project A" AND status = "In Progress" will return issues from Project A that are currently in progress.
- Wildcards: JQL supports wildcards (* and ?) to match patterns in your search. Use * to match zero or more characters and ? to match exactly one character. For example, summary ~ "bug*" will return issues with summaries starting with "bug".
- Date Functions: JQL provides date functions such as startOfDay(), endOfDay(), startOfWeek(), endOfWeek(), startOfMonth(), endOfMonth(), and more. Use these functions to search for issues based on date fields like created, updated, or due.
- Relative Dates: You can use relative dates in JQL queries, such as startOfDay(-7d) for one week ago, endOfDay(2w) for two weeks from now, or startOfMonth(-1M) for the beginning of the previous month.
- Saved Filters: Save frequently used JQL queries as filters for easy access. Filters can be shared with other users or used to create dashboards and reports.
- Field Operators: JQL supports field operators such as = (equals), != (not equals), <, >, <=, >=, IN, NOT IN, IS EMPTY, and IS NOT EMPTY. Use these operators to refine your search criteria based on specific field values.
- Ordering Results: You can order the results of your JQL query using the ORDER BY clause. For example, ORDER BY priority DESC, updated ASC will sort the results by priority in descending order and then by updated date in ascending order.
- Subqueries: JQL allows you to use subqueries to further refine your search criteria. For example, (project = "Project A" AND status = "In Progress") OR assignee = currentUser() will return issues from Project A that are in progress or assigned to the current user.