Jira automation, can I use smart values with JQL search?

Roger Mcgregor January 24, 2022

Hello

I am wondering if I can use smart values with JQL search in jira automation. What im trying to do is use JQL condition component to check if the {{issue.comments.last.author.displayName}} is not in a specific user group. Something like this {{issue.comments.last.author.displayName != membersOf("team")}}

3 answers

2 accepted

3 votes
Answer accepted
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2022

You can use smart values in JQL but you'll need to make sure it evaluates to a proper JQL.

My advice would be to use the Log Action to try to create you JQL string and then test out the JQL manually to make sure it's valid. e.g you might need to add quotes around the JQL to make it work in some cases

e.g. 

assignee = '{{issue.comments.last.author}}'

Cash Coyne
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.
October 26, 2022

I tried your example in a Jira advanced search for issues, but got this error:

The value '{{issue.comments.last.author}}' does not exist for the field 'assignee'.

What am I doing wrong?

Sanjog Sigdel
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 18, 2023

Does this work specific to a specific Jira Version?
I also tried this query but it didn't work. Got same error message.

Marc Isikoff November 6, 2023

Your Jira needs to be team-based for you to check if anyone on any field is in the team.

1 vote
Answer accepted
Pramodh M
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 24, 2022

Hi @Roger Mcgregor 

Welcome to the Community!!

Smart values with JQL search in Jira automation is possible.

Make sure the smart value you are using returns a valid value.

It's not possible to check if the user has commented on an issue.

Thanks,
Pramodh

0 votes
Roger Mcgregor January 25, 2022

thank you so much for the help, this helped. Appreciated.

Suggest an answer

Log in or Sign up to answer