jira automation jql smart values

Jira Automation with JQL Smart Values

By James Jones
AD

Jira automation has become an invaluable tool for teams aiming to streamline their workflows and boost productivity. One of its most powerful features is Query Language (JQL) and its ability to leverage smart values for efficient issue management.

Smart values in JQL allow you to dynamically define and apply values based on other fields, making your queries more flexible and powerful. In this comprehensive guide, we'll delve into the world of Jira automation with JQL smart values, exploring their usage, benefits, and best practices.

Understanding JQL Smart Values

JQL smart values enable you to specify dynamic conditions for fields in your Jira queries. They are enclosed in curly braces { } and can be used to pull values from other fields, making your queries more self-contained and versatile.

AD
Jira Keyboard shortcuts
Jira Keyboard shortcuts
Jira Tutorial – Complete Guide to Project Management and Issue Tracking
Jira Tutorial – Complete Guide to Project Management and Issue Tracking
15 Best Jira Dashboard Examples
15 Best Jira Dashboard Examples

Smart values can be used to simplify your queries, reduce redundancy, and make them more maintainable. By leveraging smart values, you can ensure that your queries remain accurate and up-to-date, even as project details evolve.

Basic Syntax and Examples

Smart values follow a simple syntax: {fieldName[defaultValue]}, where fieldName is the name of the field you want to reference, and defaultValue is the value used if fieldName is empty or not found.

Master Project Management with Jira Software
Master Project Management with Jira Software
Jira Automation workflow Scrum Master, Business Analyst, Etsy Sales, Too Cool For School, Social Media Design Graphics, Project Management, Real Time, Linux, Social Media Design
Jira Automation workflow Scrum Master, Business Analyst, Etsy Sales, Too Cool For School, Social Media Design Graphics, Project Management, Real Time, Linux, Social Media Design
10 Best Jira Alternatives You Should Consider in 2025 - Teamcamp Blog
10 Best Jira Alternatives You Should Consider in 2025 - Teamcamp Blog

For example, consider a project with a 'Component/s' field. You can use a smart value to query all issues that have a particular component:

component = {Component/s}

Using JQL Operators with Smart Values

You can also use JQL operators to compare smart values with fixed values or other smart values. This allows you to create more complex queries that adapt to your project's dynamics:

AD

fixVersion = 'v4.0' AND {Fix Version/s[latestRelease]} GT {Fix Version/s[latestRelease] - 1}

In this example, the query will find all issues with a fixVersion of 'v4.0' and a latestRelease that is one version older than the current latestRelease.

an info poster with instructions for how to use the jira automat workflow
an info poster with instructions for how to use the jira automat workflow
# Master JIRA Like a Pro! | Vikaas Daruri posted on the topic | LinkedIn
# Master JIRA Like a Pro! | Vikaas Daruri posted on the topic | LinkedIn
Jira Project Management vs ClickUp Demo – A Comparison
Jira Project Management vs ClickUp Demo – A Comparison
Master JIRA COURSE
Master JIRA COURSE
Atlassian unveils Jira suite updates to ease collaboration for all involved in software development
Atlassian unveils Jira suite updates to ease collaboration for all involved in software development
JIRA Defect Life Cycle
JIRA Defect Life Cycle

Leveraging Smart Values in Advanced Queries

Smart values truly shine when used in conjunction with other JQL features. They can help you create sophisticated queries that handle complex scenarios efficiently:

For instance, you can use smart values with subqueries to isolate issues based on multiple conditions. Let's find all high priority issues that are pending testing:

AD

priority = High AND (status = 'To Do' OR status = 'In Progress') AND issueFunction in subqueriesOf({affectedIssue})

Managing Versatile Epics

Epics can span multiple projects and versions, making it challenging to keep track of linked issues. Smart values can help you create an epic query that encompasses all related issues:

Introducing Jira to your teams and company
Introducing Jira to your teams and company
Spikes360 | Substack
Spikes360 | Substack
Jira AI Workflow Automation in Action | Smart Agile Productivity
Jira AI Workflow Automation in Action | Smart Agile Productivity
Introducing Jira Work Management - Inside Atlassian
Introducing Jira Work Management - Inside Atlassian
Jexo brings popular planning tools to Appfire | Appfire
Jexo brings popular planning tools to Appfire | Appfire
SLA Gadgets in Jira: Visualize, Analyze, React
SLA Gadgets in Jira: Visualize, Analyze, React
an info poster with different types of information
an info poster with different types of information
Jira: Project Management for the AI Era
Jira: Project Management for the AI Era
a person holding out their hand with an artificial robot on it's screen and icons surrounding them
a person holding out their hand with an artificial robot on it's screen and icons surrounding them
Features of JIRA software
Features of JIRA software
Not only epics and stories: understanding Jira issue types
Not only epics and stories: understanding Jira issue types
🚀 Make Testing Easy with This Jira QA Testing App
🚀 Make Testing Easy with This Jira QA Testing App
Jira | Issue & Project Tracking Software
Jira | Issue & Project Tracking Software
AI Sprint Planning with Jira AI | Smart Agile Workflow Automation
AI Sprint Planning with Jira AI | Smart Agile Workflow Automation

issuetype = Epic OR epiclink in ({currentEpic}.issues)

This query will return both the current epic and all issues linked to it, regardless of the project or version.

Extracting Values from Computed Fields

You can even use smart values to extract values from computed fields, provided by add-ons like the Jira Suite Utilities:

AD

{customfield_xxx.lastValue()}

Here, {customfield_xxx} is the id of a computed field that returns the last value of another field.

Best Practices and Troubleshooting

While smart values offer immense flexibility, they can also introduce complexity. To keep your queries clean and efficient, follow these best practices:

  • Keep your smart values concise and self-explanatory.
  • Avoid deep nesting of smart values to prevent performance issues.
  • Regularly review and update your queries to maintain accuracy as your project evolves.

Tackling Common Issues

If you encounter errors or unexpected behavior with smart values, remember to double-check:

  • The field name and IDs for accuracy.
  • The syntax and placement of curly braces.
  • The capitalization and spaces (if any) in field names.

If you're still having trouble, consult the Jira documentation, Atlassian community forums, or consider seeking assistance from Jira support or experienced admins in your network.

Embracing JQL smart values is a significant step in unlocking the full potential of Jira automation. By mastering this feature, you'll be well on your way to creating robust, maintainable queries that streamline your team's workflows and boost productivity. Happy automating!

AD