Fixes T8147, All day events should obey selected query range in viewer timezone.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T8147: All day events should only be part of query result if they occur within query date range in viewer's timezone
- Commits
- Restricted Diffusion Commit
rP46c5e055a291: All day events should obey selected query range in viewer timezone.
Create all day event May 25, query for events May 26-27. All day event should not be part of the query results list.
Diff Detail
- Repository
- rP Phabricator
- Branch
- calendaralldayquery
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 6297 Build 6319: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
src/applications/calendar/query/PhabricatorCalendarEventQuery.php | ||
---|---|---|
204–205 | If the query has no ranges, or only one end of the range, I think this will incorrectly filter all the events? (In the general case, like the list view, a query may execute with no range constraints at all.) | |
206 | Consider using foreach ($events as $key => $event) { ... unset($events[$key]); } to remove events (i.e., reject bad events) instead of collecting the events you're going to keep. If there are several filters, it's a little simpler to do: foreach ($events as $key => $event) { if (no_good()) { unset($events[$key]); } } ...several times in a row, instead of repeatedly moving everything to a new list of filtered events. This is more consistent with other query classes, which more frequently have several reasons to reject objects. | |
208 | I think the array_values() is unnecessary? |