Atlassian has changed API endpoint for fetching tickets #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request updates the Jira API integration in the extension to comply with the latest Atlassian Cloud changes. The previous implementation relied on
GET /rest/api/latest/search?jql=..., which has been removed by Atlassian (see [changelog](https://developer.atlassian.com/changelog/#CHANGE-2046)).The new API requires using
POST /rest/api/3/search/jqlwith the JQL query provided in the request body.Changes
axios.get(CONSTANTS.url(baseUrl), …)with aPOSTrequest to${baseUrl}/rest/api/3/search/jql.maxResultsinto the request body, as required by the new endpoint.AcceptandContent-Type) to align with Atlassian’s API specification.key,summary, andupdatedto reduce payload size.Motivation
Without this change, the extension fails to fetch issues from Jira Cloud because the old endpoint returns:
{ "errorMessages": [ "The requested API has been removed. Please migrate to the /rest/api/3/search/jql API." ], "errors": {} }This update restores compatibility with Jira Cloud instances and ensures that users can continue fetching their assigned tickets.
Testing
atlassian.net) using API tokens.Notes
GET /rest/api/2/search) may require separate handling if backward compatibility is a concern.