Why doesn't this automation JQL smart value work?

Dave Brennan January 9, 2025

Based on the smart value documentation and other posts in the community, I thought this JQL query would be fine:

{{issue.updated.isAfter(issue.sprint.startDate.plusDays(1))}}

However, when the automation runs the logs are showing the following error:

No subsequent actions were performed since JQL condition did not pass due to error running JQL: "(key IN (TTX-12345) AND ((sprint in opensprints()) AND ()))" - Error in the JQL Query: Expecting a field name but got ')'. You must surround ')' in quotation marks to use it as a field name. (line 1, character 57)

What am I doing wrong and how do I add a check that is true when an item us updated more than one day after the sprint start?  I had another condition that contains "sprint in opensprints()" so it seems like the automation is trying to compbine these and ending up with an empty string for the smart value?

2 answers

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2025

Hello @Dave Brennan 

First, there is no support for comparing one date/time field directly to another date/time field in JQL.

Second, that smart value itself is not valid for a JQL criteria. You can find documentation of valid JQL structures and syntax here:

https://support.atlassian.com/jira-software-cloud/docs/what-is-advanced-search-in-jira-cloud/

You can use smart values in JQL within Automation Rules, but the JQL structure must still be valid such as:

Field <operator> Value

...where Value could be replaced by a smart value.

 

Can you share with us more information about the problem you are trying to solve with your rule? Also share with us the entire rule that you have so far. We may then be able to suggest an alternative implementation.

0 votes
Atlass Monster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2025

What you have wrote should return a bool true or false result. You it inside a if block. The rest of the JQL could be a lookup or part of a Schedule trigger jql. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events