-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Users.all() does not return all users #327
Comments
As a quick fix you can use |
Thanks! I don't think that will help me at least. Since, it doesn't return the status unfortunately. So I think I am stuck doing two requests and combining / adding a status field. |
Ah yes, you're right, if you need a status property then you have to make a separate request for each user anyway which isn't optimal and very slow, but that's what we get with current Redmine API. The only thing I would mention is a users = redmine.user.filter(status='')
for user in users:
user.refresh() # this is an equivalent of redmine.user.get(user.id), you can also do a u = user.refresh(itself=False) if you want to get a copy of a user resource in another variable
print(user.status) |
Fixed in cece6b4 |
https://python-redmine.com/resources/user.html#all does not appear to return all users. It only returns the active users. It does not include the registered or locked users.
I am trying to search for users to update their accounts from a third party system if they are in an external group, and reactive them. However since all() does not return everyone, it tries to create them instead of trying to unlock and then update them.
Thanks!
The text was updated successfully, but these errors were encountered: