Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to define action for empty smart value?


I have a following script that lists issues in Slack message depending on issue priority:

*{{issue.summary}}* has been completed *({{Perforce Branch.value}} {{Platform Options.value}} {{Build exe.value}}*).
*CL:* {{Revision}}
*Link:* <{{issue.url}}|{{issue.key}}>
*Tester:* {{initiator.displayName}}


:blocker: *Blocker*
{{#if(equals(, "Blocker"))}}
* <{{url}}|{{key}}> - {{summary}}

:bangbang: *Critical*
{{#if(equals(, "Critical"))}}
* <{{url}}|{{key}}> - {{summary}}

:large_red_square: *Major*
{{#if(equals(, "Major"))}}
* <{{url}}|{{key}}> - {{summary}}

:large_green_circle: *Normal*
{{#if(equals(, "Normal"))}}
* <{{url}}|{{key}}> - {{summary}}

:large_blue_circle: *Minor*
{{#if(equals(, "Minor"))}}
* <{{url}}|{{key}}> - {{summary}}

 However, I'm not sure how to add to the script when there is, say, no Minor issues? If there is nothing to print, currently there's just empty space after the heading - but I'd like it to say something like ":tada: No new Minor issues found!" Not just sure what IF or NOT condition I should be referring to?

Pinging @Mykenna Cepek as you've provided great answers before! :)

1 answer

1 accepted

1 vote
Answer accepted
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 09, 2022 • edited

Wow, my first shout-out right in the OP. I'm humbled, @Jenni !

So, one option is to use nested #if statements to suppress an entire section:

{{#if(equals(0,0))}} {{#if(equals(1,1))}} hello {{/}} {{/}}

But that's starting to get excessive and hard to read.

Something else to consider would be to pull out most of the #if logic into conditionals in the rule before the Slack action, and build variables for the output. Then when creating the slack message:


or whatever.

Note that I've not had good success with defining blank variables in automation. That's why my example above checks against "x". There may also be issues with newline in variables.

So the pseudocode for one section might be like:

  • action: set variable(s) to "x"
  • conditional: if = "Major" then set variable(s) to real values

I hope that makes sense.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events