G’day mates! We’re on the home stretch. It’s the last JQL lesson! At this point you’ve mastered the basics of JQL in lesson 1 and lesson 2 and have used it in a number of JIRA features in lesson 3. One of the great things about JIRA is that it is easily extensible. It’s extensiblity layer makes it easy to add new features or extend existing ones. JQL is no exception in that regard. There are a number of plugins for JIRA on the Atlassian Marketplace that enhance JQL. You can also develop custom functions yourself or work with an Atlassian Expert to build a custom tailored experience.

Ready to Install: Atlassian Marketplace

JQL Tricks

The JQL Tricks plugin (paid) has a lot of functions that extend JQL. It includes a set of functions that query around many of JIRA’s core constructs: users, versions, issues, comments, etc. A full function list can be found at J-Tricks. I like to stay on top of new issues that get created in JIRA for projects I own. I’ve created a dashboard that includes the Filter Results gadget and uses a filter that binds to the JQL query:

project IN projectsLeadByUser() AND created > lastLogin() ORDER BY created

ProjectsLeadByUser() returns all the projects where I am the project lead. That function will also take a username if you want to see someone else’s projects. The created > lastLogin() returns all the issues created since I last logged in. Now everytime I log into JIRA I see a concise list of new issues.

Search attachments

One of the great things about JIRA is it’s ability to search issues in its database. The Full-text Search Attachments for JIRA Plugin (paid) enables JQL statements to search attachments for name, type, and content. The plugin supports a variety of file types as well. For organizations that store documents inside of JIRA this plugin now enables them to search those documents for content. If I wanted to search for an attachment that had the words case study in it, I can elegantly type:

issue IN havingAttachments("Case Study")

Reach into filters, subtasks, and linked issues

One of the limitations of JQL in core JIRA is the ability to perform a sub select. The Craftforge JQL Functions Plugin (free) allows users to search within a filter, linked issues, and subtaks with JQL. Why is this useful? At a prior engagement I needed a way to see all of the subtasks that were part of a set of issues in one query. This plugin allowed me to get all of that data in one query. For example:

(TYPE = story AND fixVersion = earliestUnreleasedVersion()) OR issue IN subtaskIssuesFromQuery("type = story and fixVersion = earliestUnreleasedVersion()")

In sprints my team works on a variety of issues: stories, tasks, bugs, etc. When we commitied a story to a sprint, the team would create subtasks to break that story down across disciplines (server, ui, and test). The above query would return the main stories as well as the subtasks we committed to the sprint. It separated the new feature work from other existing issues. Issues not in this query usually was technical debt we were working to resolve.

Issues as a custom field

If you’ve ever wanted to combine the power of links but restrict the issues users can link to, take a look at the Query Issues Custom Fields plugin (free). This plugin enables a custom field that shows a set of issues defined by a JQL query. Some organizations uses this plugin to link incoming issues to a project ticket. As the project tickets close, they dynamically drop off of the custom field in the create dialog.

Flexible Email Notifications

We covered subscriptions in the last lesson. Subscriptions allow users to sign up for notifications on a set interval if issues are returned when a JQL query is run. If you are looking for even more flexibility the Notification Assistant for JIRA (paid) brings subscription to the next level. Subscriptions are great for self notification and to groups defined within JIRA. The Notification Assistant, however, allows more flexible reporting to distribution lists, users outside of JIRA and has more options for setting thresholds for user notifications.

JIRA speaks HipChat

For users who prefer to get notification via instant messaging, JIRA now seamlessly integrates with HipChat in our free connector. HipChat is Atlassian’s instant messaging platform for software teams. Hipchat has all the goodness you’d expect from an instant messaging tool including a self building buddy list, video integration, group chat. Now it integrates with JIRA! If you want to alert specific engineers when a blocker issue gets fixed, this is your plugin. Atlassian University put out a great tutorial on how to set up the integration.

Building Your Own

All of Atlassian’s products are extensible. If a feature you need is not in the core product or on the marketplace you can extend JIRA yourself. There are two ways to build add ons to JIRA: engaging an Atlassian Expert or doing it yourself. Developing add ons for JIRA requires Java, Javascript, CSS, and HTML skills. JQL extensions are written in Java.

Atlassian Experts

Atlassian Experts help deliver an incredible experience with our products. Atlassian Experts are familiar with all aspects of our products and can assist in installation, configuration, and customization of our products. It’s easy to engage with one of our Experts to extend our products to meet your key requirements. To learn more, visit http://www.atlassian.com/resources/experts.

Building it yourself

Atlassian hosts all of the developer documentation on http://developer.atlassian.com. We’ve got two main articles on JQL addons. I’d recommend starting with the tutorial that outlines how to add a recent projects function to JIRA. More complete documentation can be found in the JQL section of our plugin module documentation.

Wrapping Up

We’ve covered a lot of information in four sessions. If you’d like to review the series:

Also, don’t forget to bookmark Advanced Searching. It’s the most complete source for all things JQL in JIRA.

I’ll toss in one last tip before we go. To search all text fields in JIRA at once

text ~ "Search Text"

The text field is a combination of all text fields in JIRA (summary, description, comments, etc). The ~ operator tells JIRA to do an inclusive search of the field rather than requiring the field to be exactly the value. “Search Text” can appear anywhere in an issue and JIRA will include that issue in the search results.

Thanks again everyone! Want to learn even more? Sign up for the JIRA Insiders Email.

Subscribe