Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using smart value or smart variable in Automation Lookup Issues Action

Kyle Quevillon February 8, 2021

Is it possible to use smart values or smart variables within the JQL statement used in "Lookup Issues" actions?

I am having trouble doing so.

I have a custom field that is a list of project keys.

I have a custom type that has that field set.

I want to find all instances of this custom type that has that custom field set to a specific value that equals the project key that the object I am creating is within.

So custom smart variable projKey is set to {{issue.project.key}}

How do I then use that smart variable in the jql in a find issues action?

My jql looks like

"Project Key[Dropdown]" = "{{projKey}}"

but it will not validate.

If I instead use a static string that is one of my project keys, the it validates.

"Project Key[Dropdown]" = "Foobar"

 

Any ideas?  Thanks.

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
February 8, 2021

Hi @Kyle Quevillon 

Yes, you may dynamically build JQL within an automation rule, and it will not validate because the values in the smart values are unknown at the time of rule writing.

Would you please provide an image of your entire rule and JQL for the lookupIssues action?  That may give the community more information to help you.  Thanks!

Best regards,

Bill

wwalser
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 9, 2021

This is correct, JQL statements containing smart values can not be validated since we have no value to substitute in for the smart value until an automation is running. 

I'll pass a note to our technical writer who will consider adding wording calling out this fact.

Thanks for letting us know that this is confusing.

Like • 4 people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events