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.
Tags
None
Referenced Files
F15464134: D13354.id.diff
Wed, Apr 2, 6:39 AM
F15455357: D13354.id.diff
Sat, Mar 29, 11:49 PM
F15453979: D13354.id32311.diff
Sat, Mar 29, 3:26 PM
F15451684: D13354.diff
Fri, Mar 28, 11:20 PM
F15415234: D13354.diff
Thu, Mar 20, 5:00 AM
F15414425: D13354.diff
Thu, Mar 20, 12:34 AM
F15412627: D13354.id32311.diff
Wed, Mar 19, 2:04 PM
F15367341: D13354.id.diff
Tue, Mar 11, 5:34 PM

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.