Page MenuHomePhabricator

First of a two-part fix where the availability wasn't taking into account all-day and recurring events.
Needs RevisionPublic

Authored by lpriestley on Jun 19 2015, 3:50 AM.

Details

Summary

Ref T8600, First of a two-part fix where the availability wasn't taking into account all-day and recurring events.

Test Plan

Create all-day, recurring daily event, starting <today>. Open user page with availability, user should show as available in 3 days at 11:59PM.

Diff Detail

Repository
rP Phabricator
Branch
useravailability
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6867
Build 6889: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

lpriestley retitled this revision from to First of a two-part fix where the availability wasn't taking into account all-day and recurring events..
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
aik099 added inline comments.
src/applications/people/query/PhabricatorPeopleQuery.php
209–211

Are you sure, that caching is no longer needed?

src/applications/people/query/PhabricatorPeopleQuery.php
209–211

Ah, good call. Testing gibberish.

lpriestley edited edge metadata.

Adding back code removed for testing

epriestley edited edge metadata.
epriestley added inline comments.
src/applications/calendar/query/PhabricatorCalendarEventQuery.php
177

What's the reason for this change? I don't understand why this can't be something like 200 if the original caller calls setLimit(200).

This revision now requires changes to proceed.Nov 7 2015, 3:57 PM

I also apparently don't understand how min() and max() work, but same deal except with 50 I guess.

src/applications/calendar/query/PhabricatorCalendarEventQuery.php
177

I kinda sorta mentioned the reason in a comment in T8600. Basically, sometimes, getRawResultLimit is 0. To reproduce the problem I'm trying to fix here:

  • Go to an empty calendar day view
  • Create an event and save
  • Get error:
Call to a member function getDateFrom() on a non-object

/Users/lkassianik/phacility/phabricator/src/applications/calendar/query/PhabricatorCalendarEventQuery.php:209

T8613 was the second part of this. Not sure if it has enough information to reconstruct the trouble we were having a few months ago with this.