Hi!
We got an automation with an incoming webhook trigger.
This trigger calls this webhook when a PR is merged into a specific branch.
The problem is that in this automation we have a JQL condition that checks whether there are no open PRs for the issue and somehow for an item this condition has failed even though the trigger of this automation is merging a PR.
Here is the rule:
Here is the log:
Here is the issue:
So it can be seen that there is only 1 PR for the issue. And it being merged called the automation that failed at the JQL check for having no open PRs.
My guess is that the merged status of PR had not travelled to Jira before the webhook that triggered the automation. Any tips on fixing this so that it does not fail in such cases?
What you’re seeing is a fairly common race condition: the webhook fires immediately on merge, but Jira hasn’t finished ingesting and indexing the PR data yet.
In these cases the JQL evaluation runs against stale metadata, so the rule fails even though the PR is actually merged. A couple of things that normally help:
• Add a short “Re-fetch issue data” action before the JQL step
• Add a small delay (manual or scheduled branch) to let the PR status propagate
• Validate PR status via a secondary condition rather than a single JQL check
When teams rely heavily on webhook-driven automation between multiple systems, it’s often useful to review the end-to-end automation architecture rather than individual rules.
Here’s a good overview of common patterns → https://redrocket.software/services/product-development/custom-software
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.