Open Bug 919762 Opened 6 years ago Updated 4 years ago
Selecting by city fails to restrict by state
When you click on a user's city to view other users in the same city, and the user lives in a country that has regions or states, it doesn't restrict by the region. Many times you will have more than one city by the same name in different states/provinces/regions in the same country (it happens frequently in the US). For a prime example, see https://mozillians.org/en-US/country/us/city/Portland/ Which gives you a list of people both in Portland ME, and Portland OR. There is also Jamestown MI, Jamestown NY, and Jamestown VA. Grand Rapids MI, Grand Rapids IA. You get the point. :)
I see that this works: https://mozillians.org/en-US/country/us/region/ME/city/Portland/ So the city link on the profile probably just needs to be fixed to include the region if there is one. There's also the problem that some people abbreviated their state and some people spelled it out...
While this is a valid bug, we need to put some thought before implementing a solution. Many other countries don't have regions altogether, or don't have duplicate city names across the country and thus people don't fill region field. Any ideas on how to solve this?
Well, we *know* that the US has this problem, and presumably Canada does, too. The first part ("Many other coutries don't have regions altogether") is obvious - if the user doesn't have a region specified, don't include it in the link. As far as some countries have duplicates and some don't, maybe just keep a list of the ones that do and special-case those. I'd suspect there aren't very many (mostly countries with huge land masses that accumulated independently settled places into the same country after they were already named). You could keep a list of countries whose cities require a region in order to be unique, and just add to that list as people report them.
I like justdave's suggestions in comment 3. I think it's reasonable to special-case the countries with regions, and we could start with Canada and the United States. For these countries, I suggest we use a dropdown menu for regions to have consistent data, and this will help us avoid the OR versus Oregon problem when users type in their own region name. This idea is worthy of it's own bug, and I recommend this bug be used for updating the links to the syntax provided in comment 1.
See Also: → 838766
I filed bug 920374 based on comment 4 and as a suggestion for improving how we handle regions. Giorgos, I'm happy to discuss more and consider other ideas. I just wanted to capture my suggestion in a bug to start a conversation.
(In reply to Dave Miller [:justdave] (firstname.lastname@example.org) from comment #3) > Well, we *know* that the US has this problem, and presumably Canada does, > too. The first part ("Many other coutries don't have regions altogether") is > obvious - if the user doesn't have a region specified, don't include it in > the link. That a simplified approach because countries may have regions in papers but people don't use them, so some may fill in this field, some may not. > As far as some countries have duplicates and some don't, maybe > just keep a list of the ones that do and special-case those. Any ideas on where we can get that kind of information? I believe that a solution to this bug will come after we solve bug 838744.
I do think the proper solution to this problem is to disambiguate with real geographic data; the current data just aren't good enough to depend on. I created bug 920651, which duplicates a few other bugs but would beat them in a specificity contest.
While refactoring this, please make sure that the related tests are up to date. Cases like bug 1032905 need testing.
Whiteboard: [kb=1423317] → [Triage 2015-04-17][kb=1423317]
Assignee: jgiannelos → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.