Rest API not returning members in alphabetical order
![](https://secure.gravatar.com/avatar/88785831d8db39c25cab3685d8aa58bb.jpg?s=120&d=mm&r=g)
Based on Rest API documentation I expected that list of members will be returned in alphabetical order.
However, when I tried localhost:8001/3.0/lists/new.list.example.com/roster/member and localhost:8001/3.0/members/find?list_id=new.list.example.com&role=member&page=9&count=10 I got list of members in order of creation.
I tried same thing on another server, and I got members ordered alphabetically.
Any ideas what might be causing this behavior?
![](https://secure.gravatar.com/avatar/5e7b1f320a5a2a058af6953b59adc109.jpg?s=120&d=mm&r=g)
Any online developers that can help out with this? It would be helpful.
Brian
![](https://secure.gravatar.com/avatar/5e7b1f320a5a2a058af6953b59adc109.jpg?s=120&d=mm&r=g)
Just to add some additional information:
List owners/moderators are being sorted alphabetically. Just not list members/users.
Mailing Lists are being sorted alphabetically. Just not list members/users.
Using MySQL as the backend database.
![](https://secure.gravatar.com/avatar/e2371bef92eb40cd7c586e9f2cc75cd8.jpg?s=120&d=mm&r=g)
goran.terzic@gmail.com writes:
I got list of members in order of creation.
I tried same thing on another server, and I got members ordered alphabetically.
What do you mean by "alphabetically"? "Alphabetically on display name" is a plausible interpretation, but in fact Mailman 3 orders alphabetically on email address.
Any ideas what might be causing this behavior?
Ordering of the result set is done by the DBMS backend, so the problem is either that the ORM code (SQLAlchemy) is not communicating the request to the DBMS, or the DBMS is buggy. That is, .find_members is implemented in models/subscription.py, where it requests the backend to order by list-id, email address, and user role in that order of precedence. Do you have the same version of the same DBMS backend in both? Same version of SQLAlchemy?
Steve
![](https://secure.gravatar.com/avatar/5e7b1f320a5a2a058af6953b59adc109.jpg?s=120&d=mm&r=g)
Alphabetically in regards to email address.
We are using MySQL on the development server instead of Postgresql. We tried different versions of SQLAlchemy as well. Same results.
participants (3)
-
brian_carpenter@emwd.com
-
goran.terzic@gmail.com
-
Stephen J. Turnbull