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
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
Hi Atlassian Community!
This article is for the power users of Jira automation to show you how to use our new 'Create variable' action.
This new action allows you to define your own smart value, which can be used in other actions and conditions in the same rule. The smart value you define can consist of other smart values, as well as math functions. (Told you it was for Power users!)
Often, in Jira automation, you want to access custom smart variables that have been defined inside a branch. If it is outside that branch then, until now it was not possible. With the new action, however, you can store a value into this variable and achieve your goal.
In some scenarios, we can build a workaround for this feature request (Add ability to branch within a branch) storing the result from the branch into a variable.
Below is an example of how this might work.
Right now, perhaps you are thinking: "Which variable type will be set when we create a component like a variable?" I would like to point out that this variable will be a String type.
We have created a rule to show that the Issue key SD-7 was the trigger that returned from that JQL. Then we will be able to set the variable as the result of the Branch JQL that is the issue CK-159. Through this variable, we will be able to access the value out of the branch.
Audit log result:
Before this new action, you would not be able to access the branch result so this opens many opportunities. We're very happy to announce this new feature. You can read a little more about it in our docs and we will share more updates about this component soon.
Be aware when you will use a Branch, because we cannot guarantee the order of the Branch, and in some cases, this can impact the result of the variable. We have this feature request to improve it: AUT-517 - Rule branch order is non-deterministic. In some cases it would be better for branches to execute in order.
Hope that this helps!