Hello Atlassian community,
I have an automation rule that when a comment is added to a ticket in status "Waiting for customer" the ticket will transition to "Waiting for support".
The problem i am facing is when an agent adds a commend and then manually transitions the ticket that the same time, automation fails. This is because the automation is slower then the agent who already changed the status themselves.
Is there any way for the rule to check if the transition has already occurred to avoid getting failed alerts?
I'm sure a quick recommendation will be to add an condition to the rule so it only runs if the commenter is not an agent. This does not work on my environment as many of our customers are fellow agents. We have multiple teams that work within the same project and the tickets can often be from a tier 1 agent reaching out to tier 2 or 3. I need to make sure that when a tier 1 agent who needs help comments on a ticket, the ticket still transitions to waiting for support that way the tier 3 agent knows the ticket is now waiting on them.
Hi @Jeremy Wood ,
Actually, I have encountered the same problem before, and the automation was trying to perform the transition after someone had already done it manually.
The trick for me was to add a status check before the transition. I had to make sure the rule was only executed when the issue was still in the Waiting for customer status
If status = Waiting for customer then transition to Waiting for support
Otherwise – do nothing
The trick was to put it inside an If/Else statement, and it completely eliminated the problem because the rule would simply skip the transition if it had already been done.
How wild. So you have the conditional logic on the trigger, and your adding an extra IF statement right at the beginning of the of the automation to check the status a 2nd time? Do you have to add a Re-fetch work item data before the IF statement?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked! I added a re-fetch and an IF statement right at the beginning of the automation. Now when doing my test, if i change the status before automation does the automation logs just say "No action taken." perfect!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it got solved😁
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jeremy Wood
Glad @Himanshu Tiwary can help you.
Yes, re-fetch makes sense here because the rule may still be using the older issue state from when the automation started. If the issue was already transitioned manually in the meantime, re-fetch pulls the latest status before your IF check runs.
That is why your updated version now works after adding re-fetch and the IF condition, the rule sees the issue is no longer in Waiting for customer and simply logs “No action taken” instead of failing.
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.