Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira automation doesn't refer to latest values of a ticket

I am trying to use Jira automation to transition tickets through multiples states. Block level statements are as below:

If status = State1 {

transition to State2

refetch issue data


If status = State2 {

transition to State3

refetch issue data


And so on

The ticket gets transitioned to State2 but doesn't transition to State3. If I trigger the automation manually after ticket has transitioned to State2, it does transition to State3.

I have 'If' statements as above since, to start with the ticket could be in State1 or State2.  I want to get the ticket in State'N' starting from any state rather than just from State1.

I tried printing the status values as comments before and after the refetch statements. So for the 1st If block it does print status as State1 (for add comment statement before refetch data) and as State2 (for add comment statement after refetch data).

Any idea why the subsequent 'Ifs' don't work?





2 answers

1 accepted

2 votes
Answer accepted
Jack Brickey Community Leader Jan 08, 2022

Hi @Meghanand Baraskar , I have to wonder if this is a race condition. I see that you are in fact using refetch data which is exactly what you should do and it should present the latest status that you just set. Having said that, to test out my theory why don't we insert some sort of other action prior to refetch. Maybe insert a comment as a test.

@Jack Brickey I did have the action to add comments as below

Screenshot 2022-01-08 at 19.29.30.png

The above adds the following comments but the next 'If' is not executed

Screenshot 2022-01-08 at 19.30.37.png

Jack Brickey Community Leader Jan 08, 2022

What does log show? Does it show that the last IF does not match the condition or does the rule exit w/o checking condition?

It says that it didn't match the condition

Screenshot 2022-01-08 at 22.28.33.png

Jack Brickey Community Leader Jan 08, 2022

Can you try another refetch right before that if condition after your comment?

Wow, that helped! Thank you. FYI, I added another refetch between the two IF blocks; so it was after the comment but outside of the IF block. 

Screenshot 2022-01-08 at 22.49.57.png

Like Jack Brickey likes this
Jack Brickey Community Leader Jan 08, 2022


0 votes
Pramodh M Community Leader Jan 08, 2022

Hi @Meghanand Baraskar 

May I know the trigger you are using

Being said that, you could try the below automation and check whether it's workingD2.png 


@Pramodh M I did have the condition to check issue status to start with. Since that wasn't working, I then moved to 'If' statement. 

As for the trigger, I have a field (radio button) on the ticket. The field is defaulted to 'No' and if user toggles this to 'Yes' then the automation to transition the ticket kicks in.

Screenshot 2022-01-08 at 19.28.39.png

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

381 views 18 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you