Open Bug 997345 Opened 10 years ago Updated 3 years ago

Mozillians.org feature request - search by timezone.

Categories

(Participation Infrastructure :: Phonebook, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: mhoye, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [needsAutomation][Triage 2015-04-17] [iam-RFE])

Like it says on the tin, I'd like to be able to search for Mozillians by time zone.
Here is a user story:
As a user, I can search for a timezone string so that I can view a results page with the profiles of Mozillians who have that timezone value.

Examples of timezone strings "America/Sao_Paulo", "Europe/Athens", "America/Denver"

The full list of timezones is listed at https://mozillians.org/user/edit/

The search functionality already looks at several profile field values to find a match. A simple fix may be just adding 'timezone' as one of the fields that is searched.
Assignee: nobody → chromano
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [mentor=giorgos@mozilla.com]
Whiteboard: [mentor=giorgos@mozilla.com] → [mentor=giorgos@mozilla.com][needsAutomation]
:chromano thanks for working on this.

If we add the timezone strings to ElasticSearch, as in your patch, we will not get valuable results. And this is because timezones are in the "Continent/TimezoneCapital" format. 

This means that if I search for Athens, I will get people with timezone "Europe/Athens" and also people staying in "Greece/Athens" also people in "Greece/Thessaloniki" but if the same timezone and also people in "Athens/Alabama/US". We'll have to do a more advanced Elastic Search query to get people only in "Europe/Athens" _timezone_. Which is doable but more complicated.


Here is what I suggest:
 * What we really want in this case is proper _filtering_ and not searching. I want to select from a dropdown a timezone and filter all mozillians in that timezone
 * It's similar to the "Include non-vouched" filter under "Advanced options" in search.
 * There is great package called "django-filter" [0] that enables you easily to perform advanced filtering of QuerySets. It's pretty amazing.
 * Using this package we can create filters for UserProfiles and then Groups and Skills and come up with a super powerful combined search and filtering page.
 * For example on UserProfiles you can filter based on "vouched", "vouched_from", "timezone" and when geolocated fields get launched on "country", "city" and "region".

Are you interested to investigate the use of this package and work towards implementing a combined search and filtering page, always with my help and mentoring?


[0] http://django-filter.readthedocs.org/
I wonder if we're approaching this the right way with named timezones. When I think of searching by timezone, the use cases I think of are things like finding a coding mentor who is awake at roughly the same time I am. So what I'd really want is not finding people in specific timezones, but in a range of similar timezones. So I'd encourage you to think about storing the person's UTC offset in elasticsearch as a number and then perhaps doing range queries on it.

Daylight savings would make this quite hard if we cared about it, but I don't think it matters for this kind of application.
Good point Benjamin. I find this to be something additional to searching with named timezones and we can tackle this as we go ahead with the filtering plan.
Status: NEW → ASSIGNED
Mentor: giorgos
Whiteboard: [mentor=giorgos@mozilla.com][needsAutomation] → [needsAutomation]
(In reply to Carlos "Henrique" Romano [:chromano] from comment #6)
> My initial take on using django_filter for search:
> https://github.com/chromano/mozillians/commit/
> 068698b69dbbb05867b53c9524f2dc578dbedad7

Nice! Thanks for working on this, chromano.

Could you please submit your commit as a Pull Request? Our team prefers to review code in Pull Requests, so we can see them all in one place.

Giorgos is offline this week and can probably review your code next week.
(In reply to William Reynolds [:williamr] from comment #7)
> 
> Could you please submit your commit as a Pull Request? Our team prefers to
> review code in Pull Requests, so we can see them all in one place.

There you go: https://github.com/mozilla/mozillians/pull/976
Since we're now working on a broder django_filter experiment in /betasearch view and we're not tackling search by timezone request in /search, I created bug 1048844 to track this work. Carlos, I assigned the new bug to you.

This bug will return to NEW state and will be resolved when we implement search by timezone in /search view
Assignee: chromano → nobody
Mentor: giorgos
Status: ASSIGNED → NEW
Drive-by recommendation - it's useful to start w/ a 3-5 personas you're targeting (e.g. Javier the Mozilla Rep, Mike the Mozilla FTE Developer, etc.) that you're expecting to be a core user for this 'searchby' timezone functionality. That ought to help guide the discussion for implementation; hope that helps!
Whiteboard: [needsAutomation] → [needsAutomation][Triage 2015-04-17]
Whiteboard: [needsAutomation][Triage 2015-04-17] → [needsAutomation][Triage 2015-04-17] [iam-RFE]
You need to log in before you can comment on or make changes to this bug.