Hello there!
I have an automation, when a pull request is merged, that:
- Check if the issue still have other opened PR
- If it doesn't, it closes the issue.
However, even when the closed PR is the latest one, it doesn't work.
After a bit of debug, it seems that in 99% of the cases (it miraculously works 1% of the time), the JQL development[pullrequests].open = 0 doesn't work because the work item itself still consider that the pull request is opened. Here is an example of the PR state.
{
pullrequest={dataType=pullrequest, state=OPEN, stateCount=1},
json={
"cachedValue":{
"errors":[],
"summary":{
"pullrequest":{
"overall":{
"count":1,
"lastUpdated":"2025-04-30T15:37:42.000+0200",
"stateCount":1,
"state":"OPEN",
"dataType":"pullrequest",
"open":true
},
"byInstanceType":{
"GitHub":{
"count":1,
"name":"GitHub"
}
}
}
}
},
"isStale":true
}
}
I tried to "Re-fetch work item data" before my JQL query, but it doesn't work either.
It's an automation that used to work but it start dysfunctioning around the 26th of march, according to my logs.
What you’re seeing is caused by a delay in how Jira Cloud updates development information from connected code hosts like GitHub. The `development[pullrequests].open` JQL field is backed by the *dev summary index*, which is refreshed asynchronously after a webhook from GitHub is processed. At the moment of your automation trigger (`Pull request merged`), the related issue often still has stale dev summary data (`isStale=true` in your snippet), so the JQL check returns an outdated `stateCount`. This aligns with recent changes to the DVCS integration rollout that can delay state updates by several seconds to minutes after merge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.