Hello.
At https://support.atlassian.com/jira-cloud-administration/docs/use-the-github-for-jira-app/#View-GitHub-information-in-Jira-issues, it is clearly stated
Deployments are linked to Jira issues by scanning for Jira issue keys in all commit messages on the deployed branch since the last successful deployment.
and otherwise visually presented
that deployment #7 will be associated with all issues found in commit messages since the last successful deployment.
This doesn't appear to be the case for us. The only deployments/builds that get associated with a jira issue are the ones triggered by pull requests that contain commits that mention the specific jira issue id. So in terms of the above flow, Deployment #7 would be associated with JIRA-1, JIRA-10, JIRA-11 and JIRA-2 would still stay associated with the previous, failed build, even though since the branch in question (main) was obviously successfully built by deployment #7, and with it the changes/code related to JIRA-2, making it successfully deployed.
What am I missing? How do I solve this?