You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi, I'm trying to use smart values to return a list of subtasks for a given task that are of a certain status. I've tried 2 different approaches and still am unable to return any results.
Approach 1 (integer):
Approach 2 (string):
Hi @Andrew Stolcers -- Welcome to the Atlassian Community!
I do not believe that smart value, list filtering works with the Server/Data Center version of automation yet.
The only work-around I can think of would be to use JQL for your conditions with a branch, enabling the bulk-handling feature, and then use the {{issues}} smart value to handle them as a set. Using this approach allows adding multiple conditions to the JQL.
Kind regards,
Bill
Hey Bill, thanks for the quick reply.
I can successfully create a filtered list by subtask assignee using the lines below. Is there a reason why this would work, but filtering by status wont?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting that the filter worked, although that is good news!
Let's try your code with a more specific condition on the id for the status...rather than letting it assume the default attribute:
{{#issue.subtasks}}
{{#if(status.id.eq(10001))}}{{key}} {{status}}{{/}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh man, that was it!! Success!! Thanks!
How would you add an 'and if' for another condition?
Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You do that with the and() expression, like this:
{{#issue.subtasks}}
{{#if(and(status.id.eq(10001),assignee.displayName.eq("1234")))}}{{key}} {{status}}{{/}}
{{/}}
https://confluence.atlassian.com/automation/jira-smart-values-conditional-logic-1081351607.html
The logical and() and or() functions only accept two parameters, and so if you need more conditions they need to be nested, like this:
and(conditionA,and(conditionB,conditionC))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.