Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AUtomation and Variables

Myles Boyd
Contributor
May 27, 2025

I have an automation that suddenly stopped working properly with variables.

 

I declare all my variables at the top before doing anything else.

I set them all to _EMPTY

I have a set of IF....ELSE  where the variables are set in each condition.

Logging the value inside the IF...ELSE ; the contents are correct

As soon as it drops out of the IF...ELSE... the values are back to _EMPTY

 

Now this worked for ages without issue, but over the last few week it is now failing. 

Has anything changed in regard to variables?

 

download (1).jpg

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2025

Hi @Myles Boyd 

FYI -- For longer rule images, it helps to use a screen capture tool or browser addon which supports scrolling page capture.  This reduces the risk of the rule image / context getting out of synch.

 

I just re-tested my example rule (similar to yours) to validate the scope of variables with conditions and it worked: when a variable is re-created in an if / else block the new value is present after the conditional block./

Please post an image of your audit log details showing the execution as that may help explain what is happening.  Until we see that...

 

Have you validated your has not been updated by others and that the variable names exactly match for all usages?

 

And, the rule you show uses the Send Web Request action and apparently has apparently disabled the option "Continue running the rule even if the request response is not successful". 

Is the other option enabled to wait until done: "Delay execution of subsequent rule actions until we've received a response for this web request"?

 

Kind regards,
Bill

Myles Boyd
Contributor
May 27, 2025

7/05/2025, 16:45:16 54893560643 CHG: Set Reporter Details
SUCCESS
16.80s
Show less
Field value changed
27/05/2025, 16:45:16

{{smart values}} condition
27/05/2025, 16:45:16

{{smart values}} condition
27/05/2025, 16:45:17

Work item fields condition
27/05/2025, 16:45:17

Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Re-fetch work item data
27/05/2025, 16:45:17

Send web request
27/05/2025, 16:45:18

CONDITION

If block
27/05/2025, 16:45:22

Else block
27/05/2025, 16:45:22

Send web request
27/05/2025, 16:45:22

{{smart values}} condition
27/05/2025, 16:45:23

{{smart values}} condition
27/05/2025, 16:45:23

Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Log action
27/05/2025, 16:45:23

Log
Manager from Okta: will.reddin@zzzz.xx
Edit work item
27/05/2025, 16:45:23

Log action
27/05/2025, 16:45:22

Log
Manager: _EMPTY

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2025

That appears to show the rule entered the first if / else block.  Is that correct?  It is difficult to know without seeing the actual image of the log.

Please post images of the following:

  • the first Create Variable action where the ProfileManager is defined
  • the first Create Variable action where the ProfileCompany is defined
  • the Send Web Request action option selections (i.e., delay and continue...)
  • the second Create Variable action where the ProfileManager is defined inside the condition block
  • the second Create Variable action where the ProfileCompany is defined inside the condition block
  • the condition to test the ProfileCompany after the if / else block

 

And, what is the purpose of the Re-fetch Work Item Data action in your rule?

 

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events