Issue Summary
When using the "Create variable" action within a branch, the variable created by this action is not available outside a branch.
This is a feature limitation tracked in JIRAAUTOSERVER-985 - Ability to use variable outside of a branch.
If you create a different variable before branching the rule (or even add a "Lookup Issue" action which has nothing to do with the variable), then create the variable inside the branch, you will be able to access the variable created inside the branch outside of it.
This behavior should not be expected, since by design, variables should not be available outside a branch.
This is reproducible on Data Center: yes
Steps to Reproduce
- Create an automation rule.
- Branch into another issue.
- Create a variable inside this branch.
- Try using the variable outside the branch.
- The value will be blank, which is expected by design
- Now, add an extra "Create Variable" action before the branch
Expected Results
A4J should not be able to access the data from variables created inside branches, which is expected by design.
Actual Results
A4J is able to access the data from variables created inside branches if another variable was created beforehand in the main execution path, which is not expected by design.
Note
Note that, if a "lookup Issue" action is added before the branch (instead of the extra "Create Variable" action), the result is the same: the Variable created within the branch will become available outside the branch.
- relates to
-
AUTO-154 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
-
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
- links to