osmcha-frontend icon indicating copy to clipboard operation
osmcha-frontend copied to clipboard

Filter by username should search by uid, not by username string

Open jake-low opened this issue 1 year ago • 6 comments

When using the Filter UI to search for changesets by a particular user...

image

... the result is to search for users matching that name (by string value), like this:

https://osmcha.org/filters?filters={"users":[{"label":"jake-low","value":"jake-low"}]}

But that has unexpected results when the user has changed their username in the past. It will only show changesets made by the user under their current name, but not show changesets made prior to their most recent name change.

A better solution would be to search by user ID, which does not change. This is also available through the filter UI:

image

https://osmcha.org/?filters={"uids":[{"label":"8794039","value":"8794039"}]}

But using it is hard, because you have to look up the ID of the user you want to filter for somewhere else (e.g. https://whosthat.osmz.ru/) and then copy/type it in.

There's no indication in the filter UI or in the results list that searching for a user by username may result in some changesets by that user being omitted. And it's a pretty surprising behavior.

A better, less error prone workflow in OSMCha would be nice. Perhaps the User and User ID filter fields could be combined into one field in the UI, which would accept usernames or user IDs and would automatically lookup the ID for users given by name, and filter for that ID.

jake-low avatar Nov 17 '24 00:11 jake-low

See also previous PRs for similar features #482, #483, #500.

danieldegroot2 avatar Jul 31 '25 18:07 danieldegroot2

Using the UID instead of user name would be a big improvement. For example, I had a user that changed their name a number of times in a matter of a few days. The same improvement would be useful for use in the watch list as well.

cliffordsnow avatar Oct 25 '25 17:10 cliffordsnow

I can image a scenario where you want to search for a specific name, omitting the alternative ones.

I hope this possibility will not be lost.

martien-176 avatar Oct 27 '25 19:10 martien-176

I can image a scenario where you want to search for a specific name, omitting the alternative ones.

@martien-176 can you elaborate? The current behavior seems surprising and unintuitive to me, and I can't really imagine a situation where I'd specifically want it, so I'm interested to hear what use case you have in mind.

jake-low avatar Oct 29 '25 21:10 jake-low

@willemarcel OSMCha will show the username of the edit so it's possible to look at specific usernames in the list of edits by a specific user id.

cliffordsnow avatar Oct 30 '25 02:10 cliffordsnow

I was imagining a situation where a mapper changed their username, eg after vandalism.

Eg username A and B. The validation happened under A, and i want to see only the A mappings.

martien-176 avatar Nov 03 '25 13:11 martien-176