Skip to content

fix: migrate Jira Cloud search to /rest/api/3/search/jql#169

Merged
oleksandr-nc merged 1 commit into
mainfrom
fix/issue-122-jira-cloud-search-jql
May 27, 2026
Merged

fix: migrate Jira Cloud search to /rest/api/3/search/jql#169
oleksandr-nc merged 1 commit into
mainfrom
fix/issue-122-jira-cloud-search-jql

Conversation

@oleksandr-nc

@oleksandr-nc oleksandr-nc commented May 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #122.

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 ever since.
Switch the two Cloud code paths in JiraAPIService to the replacement /rest/api/3/search/jql endpoint:

  • search() - endpoint swap, plus fields=*all added to the existing JQL/params. The new endpoint returns only the issue id by default; *all preserves every issue.fields.* dereference the backend and frontend already do without auditing them
  • getNotifications() - same endpoint swap. The new endpoint returns 400 Bad Request on an empty JQL, so the call now passes jql='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 - the basicRequest() branch in both methods is untouched.

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>
@oleksandr-nc oleksandr-nc merged commit 2f0cc3a into main May 27, 2026
16 checks passed
@oleksandr-nc oleksandr-nc deleted the fix/issue-122-jira-cloud-search-jql branch May 27, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API v2 depreciated

1 participant