Using JQL Subqueries (and Other Secrets) to Optimize Your Workflow

You can always count on Jira to help you streamline your work and processes.

However, as your Jira instance grows, so will the number of issues you have to manage. Even if you’re a seasoned Jira user, navigating your issues or tickets effectively can be a challenge.

Maintaining your streamlined workflow can also be tricky then – but this is where Jira Query Language (JQL) comes into the picture.

JQL is an incredibly powerful tool when it comes to searching Jira – and being able to efficiently and effectively search through your Jira instance is key to not only maintain but also optimize your workflow.

Here’s how you can use JQL subqueries (and other secrets) to do exactly just that!

1. Save your frequently used queries as filters

If you frequently search for all ‘To Do’ stories for backlog grooming purposes – then you should save the query as a filter.

 image1.png

This saves you the trouble of typing the queries into the advanced search bar multiple times.

Your saved filters can also be shared with your teams (review your permissions beforehand) which will then boost team alignment.

 image2.png

2. Quickly identify your project blockers using JQL

If you have issues blocking your projects and you can’t effectively search for them, then you can create a dedicated search filter using the right JQL keywords.

Step 1: Create a new dashboard

Step 2: Build the right JQL query and save as filter

Example:

Project = APP AND fixVersion = 1.0 AND Status = “Blocked” AND duedate < now()

3. Use modified queries to locate unassigned issues

The query assignee is EMPTY lets you pull all issues without an assignee. To narrow your search; say, issues without an assignee that haven’t been updated in the past week and are still open, then you can modify the query with additional JQL.

Example:

Assignee is EMPTY AND updatedDate < 1w AND Status = “Open”

 4. Extend JQL functionality

If you have very specific search needs that existing JQL queries can’t help you meet, then you’ve probably been manually filtering out your search results until you find what you need.

Eliminate this counter-productive practice by leveraging JQL apps that can extend JQL functionality like JQL Search Extensions which offers over 50 additional JQL keywords.

The app enables you to extensively search and report on issues, comments, subtasks, attachments, versions, epics and links, so you can find content swiftly.

5. Leverage the ability to search the content of Jira attachments

While native JQL features can’t search through attachments, extended JQL functionality can. This is one of the secrets to a highly optimized workflow.

Once you have the add-on (i.e., the one mentioned above), you can find attachments containing a specific word like “docker” using the query below:

attachmentExtension = pdf AND attachmentContent ~ “docker”

6. Use subqueries to specify your search requirements

Building up from the use case above, you can also leverage the search extension capabilities to find issues that are related with links, epics, or even subtask-parent relationships.

You do this by adding subqueries to your initial query. For instance, find stories with subtasks that are not done using:

issueType = "Story" AND subtaskStatus != "Done"

7. Expand your reporting via JQL

You might already know that you can plug a saved filter into your dashboard and even automate reporting using said filter. Imagine how much more intelligence you can harvest when you can create very specific search queries? 

More importantly, being able to tap into niche issue groups allows you to identify opportunities for greater workflow improvement.

Effective Jira Search Is Within Reach

All you have to do is to gather these secrets and start implementing them yourself! If you have any questions about JQL, feel free to drop a comment below.

3 comments

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2022

Thanks for the article @Weronika Spaleniak Appfire . JQL is indeed a great tool and there are some nice addon apps to extend the capabilities which is often needed. Here are two that I have leveraged in the past:

there are others out there too and while I haven't yet tried your's I look forward to doing so!

One other tip is to establish good naming practices for your saved filters. If you are like me you will end up with hundreds of filters so navigation can become daunting. Oh, and be sure to add a good description to your filters for reference in the future. This is particularly important to call out where the filter is used, e.g. XXX Dashboard.

Like # people like this
Filipi Lima
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2022

Great article!

If after adding JQL filters things start to slow down (usually when the complexity starts increasing or the dataset is very big), you may to review what elements may be causing it and try to optimize it.

I'll drop one of the links we share on the topic:

Like # people like this
Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2022

I also find the JQL profiler provided in ScriptRunner for Data Center is useful for understanding slow JQL queries

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events