Page MenuHomePhabricator

Show informative errors when attempting to set a recurrence end date on a non-recurring event.
ClosedPublic

Authored by lpriestley on Jun 7 2015, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 6, 11:45 AM
Unknown Object (File)
Sun, Sep 1, 11:25 PM
Unknown Object (File)
Sat, Aug 31, 12:18 PM
Unknown Object (File)
Thu, Aug 29, 6:01 AM
Unknown Object (File)
Wed, Aug 28, 8:52 PM
Unknown Object (File)
Sun, Aug 25, 10:15 PM
Unknown Object (File)
Thu, Aug 22, 10:19 AM
Unknown Object (File)
Aug 17 2024, 8:05 PM
Subscribers

Details

Summary

Fixes T8458, Show informative errors when attempting to set a recurrence end date on a non-recurring event.

Test Plan

Create new event, set recurrence end date via date-picker without setting the "is recurring" checkbox, and attempt to save. Should get error saying there cannot be a recurrence end date on a non-recurring event.

Diff Detail

Repository
rP Phabricator
Branch
calendarrecurrenceenddate
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6613
Build 6635: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

lpriestley retitled this revision from to Show informative errors when attempting to set a recurrence end date on a non-recurring event..
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.

What about just hiding the field if the event isn't recurring (or even making creation of recurring vs non-recurring events modal, so you don't have to do any JS wizardry)?

One inline with a technical issue.

src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
304

We may reach this code with $recurrence_end_enabled and $is_recurring not defined.

(For example, I'd expect canceling an event to fail with an error here.)

This revision now requires changes to proceed.Jun 7 2015, 7:06 PM

I'm not sure about making it modal. When the options are private, public, and recurring, it's very ambiguous if recurring will be private or public. I want to think about it some more before committing to that.

lpriestley edited edge metadata.

Initializing end date and recurring so that they don't throw an error when null in editor.

epriestley edited edge metadata.
epriestley added inline comments.
src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
279–280

These might need to be be $object->getIsRecurring() and $object->getRecurrenceEndDate() or similar, you might be able to sneak this through by doing it in two transactions now (remove recurring first, then edit again and add an end date).

This revision is now accepted and ready to land.Jun 7 2015, 10:43 PM
lpriestley edited edge metadata.

switch from end date enabled to just end date. simpler, and more clear.

src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
279–280

Okay, just switching to recurrence_end instead of recurrence_end_enabled. Seems like that would make more sense anyways, despite the ui preventing edits to recurring events.

This revision was automatically updated to reflect the committed changes.