Implement search-and-reconcile pattern for Jira issue creation
Summary
When creating a Jira issue for a vulnerability through GitLab, the newly created issue sometimes doesn't appear immediately in the related issues list due to Jira API v3's eventual consistency characteristics.
Users currently need to refresh the page to see the new issue.
This issue only affects Jira Cloud.
Background
As part of migrating from the deprecated /rest/api/2/search endpoint to /rest/api/3/search/jql, we've encountered a limitation with Jira's new API: it has eventual consistency characteristics and doesn't immediately return newly created issues.
Atlassian's recommended approach is to implement a "search and reconcile" pattern that polls the search endpoint and reconciles results with a local cache of expected issues.
Current behaviour
After creating a Jira issue for a vulnerability, the newly created issue may not appear immediately in the related issues list. Users must manually refresh the page to see it.
Proposed solution
Implement the full search-and-reconcile pattern as recommended by Atlassian.
A working implementation is available: reconcile-jira-issues.patch