Variable Created Inside a Conditional Block Does Not Persist Outside It

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • None
    • Affects Version/s: None
    • Component/s: Jira Cloud
    • None
    • ALL Languages
    • Product Bugs

      In Jira Automation, a variable created with Create variable inside a conditional block (an IF block, or an IF/ELSE pair) is not readable by any action after that block closes it resolves as blank unless a Create variable action has already run at the top level of the rule (outside any conditional) earlier in execution. Once one top-level variable has been created anywhere earlier in the rule, every conditional block after that point works normally, including for unrelated variables.

       

      Expected Behavior:

      A variable created via Create variable should be readable by testVariable in any later action in the rule, whether the Create variable action sits at the top level or inside a conditional block — as long as the block that created it actually ran.

       

      Reproduction Steps:

      1. Create an automation rule with trigger any  trigger (for example manual)
      2. Add a Condition: If/Else block with any condition that will evaluate true.
        • Inside the IF branch: Create variable name: testVariable, value: a literal string, e.g. sampleValue
      3. under the if block, right after: Log action testVariable.
      4. After the If/Else block closes, add a final Log action: {
        Unknown macro: {testVariable}

        }

      5. trigger the automation

      Observed result:

      Step 3's log (inside the block) correctly prints testVariable.
      Step 4's log (outside the block) prints blank.

              Assignee:
              Unassigned
              Reporter:
              Andrew A
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: