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.
Hello everyone,
We have recently made an update to the smart value system which enables a few new features. The change enables the conditional logic and other functions to be used inside nested smart values (such as list notation).
This enables some useful tricks, like filtering lists or applying complex functions to fields on an object.
Previously, if you had a list smart value, it was impossible to selectively display information inside the list based on some condition.
Take the example of issue comments. Imagine you would like to print out just the internal comments, and ignore the public comments.
You now can use an if statement to filter the list to only get the internal comments
{{#issue.comments}}
{{ if(isInternal, body) }}
{{/}}
This results in
This can be used to also create some much more complex messages as well:
{{#issue.comments}}
{{#if(isInternal)}}
- An internal comment by {{author.emailAddress.abbreviate(5)}}: {{body}}
{{/}}
{{/}}
There are a wide number of functions that can be used, such as:
{{#issue}} {{#=}} {{number_field}} + 10 {{/}} {{/}}
{{#lookupIssues}} Send web request with summaries {{urlencode(summary)}} {{/}}
{{#issue.comments}} Reading comment at time {{now}} {{/}}
{{#issues}}
{{#if(gt(comments.size, 10))}}
Issue {{key}} has more than 10 comments!
{{/}}
{{/}}
More information about the functions and smart value capabilities can be found in our smart value documentation. More information and examples will be posted there as we continue to develop more features in the smart value system.
Cheers!
Sam
Sam Harding
21 comments