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

Meghanand Baraskar January 8, 2022

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?

 

Regards,

Meghanand

 

2 answers

1 accepted

2 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 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.

Meghanand Baraskar January 8, 2022

@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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 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?

Meghanand Baraskar January 8, 2022

It says that it didn't match the condition

Screenshot 2022-01-08 at 22.28.33.png

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2022

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

Meghanand Baraskar January 8, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2022

Yay!

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 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 

Thanks,
Pramodh

Meghanand Baraskar January 8, 2022

@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
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events