Endpoint change for searching issues using JQL (GET)
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
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
Hi , I have exactly the same problem here.
I also have the same issue.
+1 with the same issue here.
Same issue
please have a look at enhanced search https://github.com/pycontribs/jira/issues/2369
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.
same issue
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.
v3.10.5 does help, but it does not set isLast correctly :(
Updating to 3.10.5 and Python 3.12 did the trick and JQL GET requests work fine again
@KronwarsCZ , I got away with testing resultlist.nextPageToken being None -> that's the end of the results.