Page MenuHomePhabricator

Update start date filtering options on Special:AllEvents
Open, In Progress, Needs TriagePublic

Description

If an event starts Jan 1 2024 and goes through Dec 31 2024, but we set our filter to start at today's date (April 30, 2024) that event will currently not show up even though it is an active event.

gif of current behavior
Screen Recording 2024-04-29 at 3.48.03 PM.gif (1×2 px, 1 MB)

Acceptance criteria:
Instead of displaying events that start on the date of the filter, the filter should show events that are active on the date of the "From" filter. This way, users will not miss out on longer events that span multiple weeks/months.

Event Timeline

Discussed today. Decisions: we will do this now, before widely sharing the event list page. We will consider adding an inline notice to ongoing events in the UI, and possibly a way for users to filter them out. That will be done in another task and is not considered a blocker. However, we still want to do it ASAP.

Daimona renamed this task from Discuss start date filtering options on Special:AllEvents to Update start date filtering options on Special:AllEvents .Fri, May 3, 12:44 PM
MHorsey-WMF changed the task status from Open to In Progress.Fri, May 3, 2:53 PM
MHorsey-WMF claimed this task.

Change #1029156 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Change sql query to show ongoing events on Special:AllEvents

https://gerrit.wikimedia.org/r/1029156

Change #1029156 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Change sql query to show ongoing events on Special:AllEvents

https://gerrit.wikimedia.org/r/1029156

@vaughnwalters Just a quick note from working on T365181: I would recommend testing pagination thoroughly (number of pages, first/prev/next/last page, no duplicated or skipped results, ...). I've done some testing for that patch, but there's a decent change I may have missed something because the whole thing is quite tricky.

If I search from May 17 2024 , then dates that start after that date display in the list. For example, test events starting in 2099 April 12 will display in the list and they should be filtered out.


Also, a couple of follow up tickets related to findings on this ticket

T365181: 500 error on Special:AllEvents when applying filters without a start date
T365271: Special:AllEvents user should not be able to select a To date that is before the From date

If I search from May 17 2024 , then dates that start after that date display in the list. For example, test events starting in 2099 April 12 will display in the list and they should be filtered out.

That's because having May 17th as start date (and no end date) is interpreted as "give me every event that is open on any day from May 17th to eternity". In particular, any event whose start date is May 17 or later fulfills this criterion and will be in the list. Which gives me just another opportunity to state that our current implementation with two date fields for selecting a range has a huge potential of being confusing.

If I search from May 17 2024 , then dates that start after that date display in the list. For example, test events starting in 2099 April 12 will display in the list and they should be filtered out.

That's because having May 17th as start date (and no end date) is interpreted as "give me every event that is open on any day from May 17th to eternity". In particular, any event whose start date is May 17 or later fulfills this criterion and will be in the list. Which gives me just another opportunity to state that our current implementation with two date fields for selecting a range has a huge potential of being confusing.

Hmmm i see. Does this AC need changed then the filter should show events that are active on the date of the "From" filter? It seems to me that If I have a from date X then it should display all dates from before that date that also go through and include that date, but not all dates that start after that date. But yes agree that even if this is the expected behavior, this is definitely confusing.

If I search from May 17 2024 , then dates that start after that date display in the list. For example, test events starting in 2099 April 12 will display in the list and they should be filtered out.

That's because having May 17th as start date (and no end date) is interpreted as "give me every event that is open on any day from May 17th to eternity". In particular, any event whose start date is May 17 or later fulfills this criterion and will be in the list. Which gives me just another opportunity to state that our current implementation with two date fields for selecting a range has a huge potential of being confusing.

Hmmm i see. Does this AC need changed then the filter should show events that are active on the date of the "From" filter? It seems to me that If I have a from date X then it should display all dates from before that date that also go through and include that date, but not all dates that start after that date. But yes agree that even if this is the expected behavior, this is definitely confusing.

Thinking about this more - I see what you mean and see how this is working as expected. It is def confusing to me though.

Thinking about this more - I see what you mean and see how this is working as expected. It is def confusing to me though.

Yeah. And similarly when you have an end date but no start date. When I was fixing T365181 I spent some time trying to figure out where the bug was, just to eventually realize that there was no bug and it was the expected behaviour.