Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-1010

Variables created within a branch are only available outside of it if another variable has been created beforehand

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Low Low
    • None
    • 9.0.3, 9.1.1
    • Actions
    • None
    • Severity 3 - Minor

      Issue Summary

      When using the "Create variable" action within a branch, you'll usually be unable to access the stored value outside the branch.

      However, if you create a different variable before branching the rule, and then create the variable inside the branch, you will be able to access the variable created inside the branch outside of it.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create an automation rule.
      2. Branch into another issue.
      3. Create a variable inside this branch.
      4. Try using the variable outside the branch.
      5. The value will be blank.

      Expected Results

      A4J should be able to access the data from variables created inside branches.

      Actual Results

      A4J is only able to access the data from variables created inside branches if another variable was created beforehand in the main execution path.

      Workaround

      Since the data from variables will be available outside their creation branch if another variable exists beforehand, we can create a variable before branching the rule, and ignore its value.

      1. Create an automation rule.
      2. Create a variable with any value on it.
      3. Branch into another issue.
      4. Create a variable inside this branch.
      5. Try using the variable outside the branch.
      6. The value will be available.

              Unassigned Unassigned
              abrancalhao@atlassian.com Armando Neto
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: