I have an automation that is meant to transition stories from 'Code Review' to 'Testing' when all pull requests are merged. They pull request status is linked through the Jira <> Github integration.
This is my implementation:
Trigger: Pull request merged
Conditions: `development[pullrequests].open = 0 & Status = Code Reveiw`
Action: Transition work item to Testing

Intended behaviour:
If my story has 3 pull requests open, when the first 2 are merged, the story status does not change. When the final one is merged, the story should change to Testing
For some reason, the automation runs correctly in some instances but then doesn't run correctly in others, and I'm struggling to find a pattern or a known reason why this might be.
Am I missing something? Is there a better way of achieving the outcome I'm looking for?
Could it be due to delays in the integration and running of the Jira automation (Github <> Jira <> Jira Automations)?