-
Suggestion
-
Resolution: Unresolved
-
None
-
0
-
If there is a requirement that involves creating a variable inside a branch or if/else block, the same variable will not hold the value when used outside of the block.
For example, suppose a rule is triggered when an issue is created. For all the issues with a similar issue description as the trigger issue, a variable is created containing all issue keys. When the same variable is printed outside the branch, it returns no values:
Expected behaviour:
It should return the same value as the variable is used in the same rule.
Current behaviour:
The variable is not accessible - if we try to access the variable, it will return an empty value.
- is duplicated by
-
AUTO-1260 Variable created inside IF Block or Branch is not accessible outside of a block , if there is no variable created globally (after trigger) in Automation
-
- Closed
-
-
AUTO-110 Linking issues among if/else blocks
- Closed
-
AUTO-597 Ability to set the scope of a variable
- Closed
-
AUTO-786 Cannot use variable created in main branch inside iterator.
- Closed
- is related to
-
JIRAAUTOSERVER-1010 Variables created within a branch are only available outside of it if another variable has been created beforehand
-
- Closed
-
-
JIRAAUTOSERVER-985 Automation: Ability to use variable outside of a block - variable is not updated on main branch if created inside an if/else or branch block
- Gathering Interest
- relates to
-
AUTO-1260 Variable created inside IF Block or Branch is not accessible outside of a block , if there is no variable created globally (after trigger) in Automation
-
- Closed
-
Form Name |
---|
Thank you, 43071b44dfdb . That could be it. In some of my child branches, I'm making API requests out to other web services. Those branches seem to lead to the issue I was describing.
Because of this issue, we've decided to stop relying so much on Jira Automations and instead have started moving some of our workloads to Azure Logic Apps, which do seem to honor the flow and allow us more flexibility and do not have this same specific issue about variables being updated in if/else branches.