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
F14026088: D13192.diff
Thu, Nov 7, 11:28 PM
F13992756: D13192.diff
Tue, Oct 22, 6:36 PM
F13988128: D13192.id31882.diff
Mon, Oct 21, 1:22 PM
F13975256: D13192.id31890.diff
Fri, Oct 18, 9:23 AM
Unknown Object (File)
Oct 7 2024, 3:39 PM
Unknown Object (File)
Oct 7 2024, 9:48 AM
Unknown Object (File)
Sep 20 2024, 12:41 PM
Unknown Object (File)
Sep 20 2024, 11:34 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.