Ref T8357, DRAFT, recurring events need optional end dates
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T8357: Add recurrence end date
- Commits
- Restricted Diffusion Commit
rP95551a1a5a6e: DRAFT, recurring events need optional end dates
Edit recurring event, set end date, save, recurring ghosts should not generate after end date
Diff Detail
- Repository
- rP Phabricator
- Branch
- calendarrecurrenceenddate
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 6406 Build 6428: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
(Not sure if you just wanted to kick this in as-is or wait to actually respect the setting, but this looks fine so far.)
Oh thanks. I will add to this a bit more before it's ready, but thanks for looking at it :3
One possible issue inline, the rest looks good to me.
src/applications/calendar/query/PhabricatorCalendarEventQuery.php | ||
---|---|---|
163 ↗ | (On Diff #31620) | I think this change isn't correct:
I'd expect $sequence_start to be about 365, and $instance_count to be about 30. So this will evaluate to: for ($index = 365; $index < 30; $index++) { ...and not enter the loop body, because $index < 30 is never true. |
Create a daily event a year ago.
Er, create a "daily" recurring event with the first instance starting a year ago.
src/applications/calendar/query/PhabricatorCalendarEventQuery.php | ||
---|---|---|
163 ↗ | (On Diff #31620) | Just tested, and this actually works as expected, but it surfaced a small bug - recurrence end date always gets set. Will fix. |
src/applications/calendar/controller/PhabricatorCalendarEventEditController.php | ||
---|---|---|
191–193 | debugging code | |
src/applications/calendar/query/PhabricatorCalendarEventQuery.php | ||
153 ↗ | (On Diff #31642) | It looks like $instance_count is the index number of the last index here |
158 ↗ | (On Diff #31642) | It looks like $instance_count is a count here. I think one of these is wrong? As written, probably this one should be $sequence_start + $this->getRawResultLimit() and the variable should be $sequence_end? |
src/applications/calendar/controller/PhabricatorCalendarEventEditController.php | ||
---|---|---|
144 | Seems slightly weird that we clone $start_value here and $end_value above? |