Open nathan-gilbert opened 1 year ago
The params need to run through json.dumps()
in order to be in the correct format. We should probably do a quick audit of all instances where we pass in params=
and ensure that all booleans are handles correctly.
Proposed work around for now:
search_users(maxResults=False, includeInactive="true", query="%")
Bug summary
The following only returns active users:
search_users(maxResults=False, includeInactive=True, query="%")
This generates a request like:
GET /rest/api/2/user/search?query=%25&includeActive=True&includeInactive=True&maxResults=100
Which does not return inactive users, only active.
In order to get all users (inactive + active) the following request needs to be generated (as verified with Postman):
/rest/api/2/users/search?includeInactive=true&query=%25&maxResults=100
A workaround is to do:
_fetch_pages(User, None, "users/search", 0, 100, {"includeInactive": "true", "query": "%"})
but that isn't the intended usage of this library.This was tested with
Python 3.11.4
.Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
No response
jira-python version
3.5.2
Python Interpreter version
3.11
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
All users, inactive and active, are returned.
Additional Context
No response