Page MenuHomePhabricator

DRAFT - Make cancel/reinstate child/ghost/recurring events work
ClosedPublic

Authored by lpriestley on Jun 3 2015, 11:22 PM.
Tags
None
Referenced Files
F14347621: D13145.diff
Thu, Dec 19, 3:04 AM
Unknown Object (File)
Thu, Dec 12, 1:48 PM
Unknown Object (File)
Thu, Dec 12, 4:47 AM
Unknown Object (File)
Wed, Dec 11, 10:21 PM
Unknown Object (File)
Mon, Dec 9, 12:25 PM
Unknown Object (File)
Sun, Dec 8, 3:51 AM
Unknown Object (File)
Sat, Dec 7, 8:52 AM
Unknown Object (File)
Fri, Dec 6, 1:56 PM
Subscribers

Details

Summary

Ref T2896, Make cancel/reinstate child/ghost/recurring events work

Test Plan

Cancel/reinstate child/ghost/recurring events.

Diff Detail

Repository
rP Phabricator
Branch
calendarcancelchild
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6542
Build 6564: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

lpriestley retitled this revision from to Make cancel/reinstate child/ghost/recurring events work.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
lpriestley added a task: Restricted Maniphest Task.
lpriestley retitled this revision from Make cancel/reinstate child/ghost/recurring events work to DRAFT - Make cancel/reinstate child/ghost/recurring events work.Jun 3 2015, 11:56 PM
lpriestley edited edge metadata.

Since we now check if there is a corresponding actual event for any ghost event we view, no longer any need to check the same thing when cancelling/resintating.

sharing code via EditorController

epriestley edited edge metadata.
epriestley added inline comments.
src/applications/calendar/controller/PhabricatorCalendarEventCancelController.php
122

Is this the same as createEventFromGhost()? Can we share the code?

src/applications/calendar/controller/PhabricatorCalendarEventEditorController.php
3

Instead of making this final, make it abstract, then extend the Cancel and Edit controllers from it.

Then call $this->createEventFromGhost() (for example) instead of PhabricatorCalendarEventEditController::createEventFromGhost().

This will let the methods be protected instead of public.

Actually, since there's a call from ViewController too, maybe it's easiest to just move these methods into the base class PhabricatorCalendarController.

This revision now requires changes to proceed.Jun 5 2015, 2:14 PM
lpriestley edited edge metadata.

moving editorcontroller up to base class PhabricatorCalendarController

epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 6 2015, 4:50 PM

Oh, one possible issue...

src/applications/calendar/controller/PhabricatorCalendarEventCancelController.php
45

This is probably buggy because it returns a response but it isn't used?

113–115

(I think it's impossible for sequence to be null, and the method is private, and the return value isn't used.)

lpriestley edited edge metadata.

Fixing cancel non-exception ghost workflow

src/applications/calendar/controller/PhabricatorCalendarEventCancelController.php
45

that cancelGhostEvent method was wrong. It didn't actually cancel anything, and it returned a redirect, which is not useful here.

lpriestley edited edge metadata.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 6 2015, 6:11 PM
This revision was automatically updated to reflect the committed changes.