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!
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events