jira icon indicating copy to clipboard operation
jira copied to clipboard

Endpoint change for searching issues using JQL (GET)

Open Zshader opened this issue 3 months ago • 13 comments

Bug summary

Atlassian recently deprecated its existing API endpoint for JQL (GET) and added a new enhanced endpoint for JQL queries that needs to be updated in the Jira class.

Ref: https://developer.atlassian.com/changelog/#CHANGE-2046 https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get

Is there an existing issue for this?

  • [x] I have searched the existing issues

Jira Instance type

Jira Cloud (Hosted by Atlassian)

Jira instance version

No response

jira-python version

main

Python Interpreter version

3.10

Which operating systems have you used?

  • [x] Linux
  • [ ] macOS
  • [ ] Windows

Reproduction steps

# 1. Given a Jira client instance
jira: JIRA
# 2. When I call the function with argument x
jira.issue("x")

Stack trace

{
response text =
"errorMessages": [
"The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046"'
errors: {}
}

Expected behaviour

response:{"A Jira issue"}

https://jira.readthedocs.io/examples.html#examples

Additional Context

No response

Zshader avatar Sep 16 '25 06:09 Zshader

For me as well it return: The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046

Full stuck: items = self.jira.search_issues(jql) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\jira\client.py", line 3557, in search_issues File "...PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\jira\client.py", line 817, in _fetch_pages resource = self._get_json( File "...PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\jira\client.py", line 817, in _fetch_pages resource = self._get_json( resource = self._get_json( ^^^^^^^^^^^^^^^ File "...\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\jira\client.py", line 4358, in _get_json else self._session.get(url, params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\sessions.py", line 602, in get text: The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046

adikowo avatar Sep 16 '25 07:09 adikowo

Hi , I have exactly the same problem here.

gcn-conseil avatar Sep 16 '25 08:09 gcn-conseil

I also have the same issue.

jyggorath avatar Sep 16 '25 09:09 jyggorath

+1 with the same issue here.

dgiakoumis avatar Sep 16 '25 09:09 dgiakoumis

Same issue

hujunfeng avatar Sep 16 '25 09:09 hujunfeng

please have a look at enhanced search https://github.com/pycontribs/jira/issues/2369

studioj avatar Sep 16 '25 11:09 studioj

the pagination rules have changed, start at and batch size ... without those search issues still works ... If no proposal for fix has been added by next weekend i might be able to spend some extra free time to resolve this.

studioj avatar Sep 16 '25 11:09 studioj

please have a look at enhanced search #2369

Looks like this should solve it, thanks

jyggorath avatar Sep 16 '25 12:09 jyggorath

same issue

jtristano avatar Sep 16 '25 17:09 jtristano

I got this today, but moving to a later python version and to v3.10.5 of the jira module it went away without messing around with enhanced search. I think it was fixed by #1940.

KuleRucket avatar Sep 17 '25 12:09 KuleRucket

v3.10.5 does help, but it does not set isLast correctly :(

KronwarsCZ avatar Sep 23 '25 14:09 KronwarsCZ

Updating to 3.10.5 and Python 3.12 did the trick and JQL GET requests work fine again

comzeradd avatar Sep 24 '25 15:09 comzeradd

@KronwarsCZ , I got away with testing resultlist.nextPageToken being None -> that's the end of the results.

gaallas avatar Oct 15 '25 13:10 gaallas