How to use advanced JQL queries on Jira
Advanced JQL (Jira Query Language) queries allow you to create complex searches using operators, functions, and field combinations to filter issues precisely. Access JQL through the Issues search with advanced mode, then build queries using syntax like project = KEY AND assignee = currentUser() OR status CHANGED AFTER -7d.
Prerequisites
- Basic understanding of Jira issues and fields
- Familiarity with Jira's search interface
- Knowledge of boolean logic operators
- Understanding of Jira project structure and issue types
Step-by-Step Instructions
Access JQL Advanced Search
Master JQL Operators and Syntax
= (equals), != (not equals), IN (matches any value in list), NOT IN (excludes values), ~ (contains text), !~ (does not contain), IS EMPTY and IS NOT EMPTY. Combine conditions using AND, OR, and NOT. Use parentheses to group conditions: project = DEMO AND (status = "In Progress" OR assignee = currentUser()).Utilize JQL Functions
currentUser() for current logged-in user, membersOf("group-name") for group members, now() for current date/time, startOfDay(), endOfWeek() for date ranges. Use issueFunction for complex searches like issueFunction in linkedIssuesOf("project = DEMO"). Combine with date arithmetic: created >= -30d for issues created in last 30 days.Build Complex Date and Time Queries
CHANGED operator: status CHANGED FROM "To Do" TO "In Progress" DURING (-1w, now()). Use WAS for historical values: assignee WAS "john.doe" BEFORE -7d. Combine date functions: created >= startOfMonth() AND resolved <= endOfMonth(). Search by specific date ranges: updated >= "2026-01-01" AND updated <= "2026-01-31".Create Field-Specific Advanced Queries
cf[10001] = "High Priority" or "Story Points" >= 5. Search text fields with wildcards: summary ~ "bug*" or description ~ "performance AND slow". Use ORDER BY to sort results: project = DEMO ORDER BY created DESC, priority ASC. Query sub-tasks: parent = DEMO-123 or epic relationships: "Epic Link" = DEMO-456.Implement Subqueries and Advanced Logic
issueFunction: project = DEMO AND issueFunction in subtasksOf("status = Done"). Create complex boolean logic: (project = DEMO OR project = TEST) AND assignee != currentUser() AND status NOT IN (Done, Cancelled). Query linked issues: issue in linkedIssues(DEMO-123, "blocks"). Use EMPTY and NULL to find incomplete data: fixVersion IS EMPTY OR "Story Points" IS NULL.Save and Share Advanced Queries
Optimize Query Performance
project = DEMO AND created >= -30d AND assignee = currentUser(). Avoid using != and NOT IN with large datasets when possible. Use specific project keys instead of searching across all projects. Limit text searches with ~ operator to specific fields rather than searching all text fields.Common Issues & Troubleshooting
JQL syntax error or query not returning expected results
Check for typos in field names, ensure proper quote usage around multi-word values, and verify operator syntax. Use the JQL autocomplete feature (Ctrl+Space) to validate field names and functions. Test individual parts of complex queries separately.
Query runs too slowly or times out
Simplify the query by adding more restrictive conditions early, especially project filters. Avoid using != and NOT IN operators on large datasets. Contact your Jira administrator about indexing if performance issues persist across multiple queries.
Custom fields not appearing in JQL autocomplete
Verify the custom field is available in your project context and you have permission to view it. Use the field ID format cf[10001] if the field name doesn't work. Check with your Jira administrator about field configuration and screen associations.
Date functions returning unexpected results
Ensure you're using the correct date format and time zone settings. Check your Jira profile timezone settings under Profile > Personal Settings. Use specific date formats like "2026-01-01" instead of relative dates when precision is important.