When searching for users, always start from the beginning of the username

RESOLVED FIXED in 2012-03-13

Status

support.mozilla.org
Users and Groups
P2
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: atopal, Assigned: tgavankar)

Tracking

unspecified
2012-03-13

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=contributor c=general s=2012.5 p=2)

(Reporter)

Description

6 years ago
This is a subset of bug 719838:

When searching in any field, start with the characters the users has typed in, do not do a "contains" query. Always match from the beginning of the username.
(Reporter)

Updated

6 years ago
Priority: -- → P2
Whiteboard: u=contributor c=general s=2012.5 p= → u=contributor c=general s=2012.5 p=2
(Assignee)

Updated

6 years ago
Assignee: nobody → tgavankar
(Assignee)

Comment 1

6 years ago
I assume this is in particular for the username API (i.e. messages, etc), correct?
(In reply to Tanay Gavankar [:tgavankar] from comment #1)
> I assume this is in particular for the username API (i.e. messages, etc),
> correct?

Yep! Just replace icontains with istartswith, I think.
(Assignee)

Comment 3

6 years ago
Done in https://github.com/mozilla/kitsune/commit/f96a9f7.

It was already istartswith, so I sorted it by username length to get better matching. The patch also filters out unused usernames (last_login prior to 3 months ago).
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-03-13
You need to log in before you can comment on or make changes to this bug.