Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User Search REST API has unstable ordering (breaking pagination)

Tasktop Admin January 12, 2023

It appears that the endpoint /rest/api/2/user/search?query= has an unstable ordering to it.

I set up 3 users, all with displayName containing "tester", and when I then run

/rest/api/2/user/search?query=tester&startAt=0&maxResults=3

I get 2 possible orderings. One is way more likely, and the other happens about 1 in 5-10 times. It's easily reproducible in Postman or similar.

This is breaking any kind of pagination, as if you are actually cycling through pages of results and some would be ordered differently, you entire result set won't have all results in it.

I reproduced this on two different Cloud instances, but it also seems to be a bit dependent on the search & users. For example on one instance we have multiple users for the "Tempo" plugin (that have Tempo in their displayname) and also a user with "tester" in the display name. Using the search term "tempo" seems to have stable ordering, but "te" has the same varying ordering as described above.

Now I guess I can reduce the likelyhood of this problem by using a large page size (and thus hoping paging will never happen), but it seems like there is some kind of bug here?

Has anybody else come across this?

1 answer

1 accepted

0 votes
Answer accepted
Tasktop Admin January 22, 2023

Discussions with Atlassian support resulted in: https://jira.atlassian.com/browse/ID-8098

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events