Rest API not returning members in alphabetical order
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?
Any online developers that can help out with this? It would be helpful.
Brian
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.
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
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