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
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
The above adds the following comments but the next 'If' is not executed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you try another refetch right before that if condition after your comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May I know the trigger you are using
Being said that, you could try the below automation and check whether it's working
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.