osmcha-frontend
osmcha-frontend copied to clipboard
Filter by username should search by uid, not by username string
When using the Filter UI to search for changesets by a particular user...
... 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:
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.
See also previous PRs for similar features #482, #483, #500.
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.
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.
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.
@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.
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.