[go: up one dir, main page]

Draft: Frontend: reconcile created Jira issues

What does this MR do and why?

This MR implements the frontend support for Jira's search and reconcile pattern to ensure newly created Jira issues appear immediately in the vulnerability related issues list.

Problem

Jira's /rest/api/3/search/jql endpoint (that we switched to in !206815 (merged)) uses eventual consistency, meaning newly created issues don't appear immediately in search results. When users create a Jira issue from a GitLab vulnerability, the issue sometimes won't show up in the related issues list until the page is refreshed.

Solution

This MR implements the frontend portion of Atlassian's recommended "search and reconcile" pattern, building on the backend support added in [insert backend MR link]:

  1. Receive the issue ID: The CreateJiraIssue component now receives the jiraIssueId from the GraphQL mutation response
  2. Pass it through: The component emits the issue ID in the mutated event
  3. Reconcile on fetch: The RelatedJiraIssues component passes this ID as the reconcileIssues parameter when immediately fetching the updated related issues list

The reconcileIssues parameter tells Jira's search endpoint: "I expect these issue IDs to exist, so if they're not in your index yet, please include them anyway." This ensures newly created issues appear immediately in the UI without requiring a page refresh.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. In GDK, select a project and configure the Jira integration
  2. If you don't have vulnerabilities in the project, use bundle exec rake gitlab:seed:vulnerabilities to seed some.
  3. Try to create a Jira issue for a vulnerability. The created issue should always appear in the related Jira issues component.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Anton Smith

Merge request reports

Loading