How username autocomplete works
1) We search logins on the current page only when entered login length is less 4 chars. I.e. when we enter
@use we still search only on the current page between html elements with class user and login (e.g.
<span class="user login man">paul</span>).
6.11.3+: In case the collection can have assignees (≤20), we also immediately match the usernames of potential assignees. If ≥21 potential assignees and an assignee hasn’t been mentioned on the page yet, they are not matched locally and they can only be matches through case 2 below.
2) But when we enter
@user(login length >= 4 chars) we call AJAX/REST_API request to users/autocomplete endpoint. There we search ALL users which logins are started with entered string like user*. The results are sorted by following priority:
- if user_login == entered string like user,
- users which can be assignee of the collection,
- users which are members of the collection,
- all other users.
Created by • Last edit by on Jul 21, 2019