Homec4science

Make limits and ranges work better with Calendar event queries

Authored by epriestley <git@epriestley.com> on Jul 13 2016, 18:29.

Description

Make limits and ranges work better with Calendar event queries

Summary:
Fixes T8911. This corrects several issues which could crop up if a calendar event query matched more results than the query limit:

  • The desired order was not applied by the SearchEngine -- it applies the first builtin order instead. Provide a proper builtin order.
  • When we generate ghosts, we can't do limiting in the database because we may select and then immediately discard a large number of parent events which are outside of the query range.
    • For now, just don't limit results to get the behavior correct.
    • This may need to be refined eventually to improve performance.
  • When trimming events, we could trim parents and fail to generate ghosts from them. Separate parent events out first.
  • Try to simplify some logic.

Test Plan: An "Upcoming" dashboard panel with limit 10 and the main Calendar "Upcoming Events" UI now show the same results.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8911

Differential Revision: https://secure.phabricator.com/D16289

Details

Committed
epriestley <git@epriestley.com>Jul 14 2016, 00:39
Pushed
aubortJan 31 2017, 17:16
Parents
rPH8ade91486cfc: Add `calendar.event.search` and `calendar.event.edit`
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH872bcd4487e6: Make limits and ranges work better with Calendar event queries (authored by epriestley <git@epriestley.com>).Jul 14 2016, 00:39