Support Jira Cloud and Server issue fetching
What does this MR do and why?
This MR fixes a regression introduced in GitLab 18.5 where the Jira issues integration stopped working for Jira Server and Data Center deployments.
Background
In !206815 (merged) (GitLab 18.5), we migrated to Jira Cloud's new /rest/api/3/search/jql endpoint with token-based pagination. However, this endpoint and pagination method only exist on Jira Cloud, breaking the integration for customers using Jira Server or Data Center.
What this MR does
This MR restores support for both deployment types by:
- Creating separate service classes for Cloud and Server implementations:
-
CloudListService: Uses API v3 (/rest/api/3/search/jql) with token-based pagination (nextPageToken) -
ServerListService: Uses API v2 (/rest/api/2/search) with offset-based pagination (startAt,pagenumbers) - Refactoring the base
ListServiceinto an abstract class with shared behaviour
-
- Updating the controller to handle both pagination approaches seamlessly
- Updating the frontend resolver to work with both token and page-based pagination
- Adding comprehensive test coverage for both service implementations, and fixed some flaky tests
To all reviewers: I apologize for the size of this merge request!
References
Screenshots or screen recordings
How to set up and validate locally
Repeat these steps twice, once for Jira Cloud and Jira Data Center.
- In GDK, select a project and configure the Jira integration
- If you require Jira credentials, I'm happy to share mine. Please contact me in Slack.
- View the Jira issues in the project. Use the navigation/search/filters/sort, click into a Jira issue, confirm it all works.
- If you don't have vulnerabilities in the project, use
bundle exec rake gitlab:seed:vulnerabilitiesto seed some. - Try to create a Jira issue for a vulnerability. The newly created issue should appear.
- For Jira Cloud, the created issue sometimes appears in the related Jira issues component. If it doesn't you need to perform a hard refresh. See here to understand why this happens.
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.






