fix: migrate Jira Cloud search to /rest/api/3/search/jql#169
Merged
Conversation
Atlassian removed the legacy /rest/api/{2,3}/search endpoint in late
2025 (CHANGE-2046); Jira Cloud users have been getting 410 Gone on every
notification cron and unified-search call since the shutdown. Switch the
two Cloud code paths to /rest/api/3/search/jql:
- search(): add fields=*all to the existing JQL/params; endpoint swap.
- getNotifications(): the new endpoint 400s on empty JQL, so pass
jql='assignee = currentUser()' explicitly. The PHP-side assignee
filter stays as a redundant safety net. Net result set is unchanged
for the cron's purposes.
Self-hosted Jira (Server / Data Center) is unaffected by CHANGE-2046
and keeps using /rest/api/2/search.
Fixes #122
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #122.
Atlassian removed the legacy
/rest/api/{2,3}/searchendpoint in late 2025 (CHANGE-2046) - Jira Cloud users have been getting410 Goneon every notification cron and unified-search call ever since.Switch the two Cloud code paths in
JiraAPIServiceto the replacement/rest/api/3/search/jqlendpoint:search()- endpoint swap, plusfields=*alladded to the existing JQL/params. The new endpoint returns only the issue id by default;*allpreserves everyissue.fields.*dereference the backend and frontend already do without auditing themgetNotifications()- same endpoint swap. The new endpoint returns400 Bad Requeston an empty JQL, so the call now passesjql='assignee = currentUser()'explicitly. The result set is unchanged for the cron's purpose (it already PHP-filters to assignee-matches-me, kept as a redundant safety net) and we transfer dramatically less data**Self-hosted Jira keeps using
/rest/api/2/search- thebasicRequest()branch in both methods is untouched.