While trying to get a list of most recent registered Users for a Wordpress site I think I found a bug (hoping I understood the querybuilder correctly):
How to Reproduce:
var query = new WordPressPCL.Utility.UsersQueryBuilder();
query.Context = WordPressPCL.Models.Context.Edit;
query.OrderBy = WordPressPCL.Models.UsersOrderBy.RegisteredDate;
query.Order = WordPressPCL.Models.Order.DESC;
query.PerPage = 100;
var result = await client.Users.Query(query,true);
What I expected:
With WordPressPCL.Models.Order.DESC the first element returned should be the most recent registered user
What I got:
first element returned was the oldest User (followed by the following oldest 99 users)
Why I belive it is a bug in WordpressPCL and not Wordpress:var result = await client.CustomRequest.Get<IEnumerable<WordPressPCL.Models.User>>("wp/v2/users?per_page=100&orderby=registered_date&order=desc&context=edit",false,true); leads to the expected result.
Assumption:query.Order = WordPressPCL.Models.Order.DESC goes unnoticed using UsersQueryBuilder
And to not only have a bug reported:
Thank you for your great work so far. It already saved me a ton of work!
While trying to get a list of most recent registered Users for a Wordpress site I think I found a bug (hoping I understood the querybuilder correctly):
How to Reproduce:
What I expected: With
WordPressPCL.Models.Order.DESC
the first element returned should be the most recent registered userWhat I got: first element returned was the oldest User (followed by the following oldest 99 users)
Why I belive it is a bug in WordpressPCL and not Wordpress:
var result = await client.CustomRequest.Get<IEnumerable<WordPressPCL.Models.User>>("wp/v2/users?per_page=100&orderby=registered_date&order=desc&context=edit",false,true);
leads to the expected result.Assumption:
query.Order = WordPressPCL.Models.Order.DESC
goes unnoticed usingUsersQueryBuilder
And to not only have a bug reported: