Page MenuHomePhabricator

Ability to join or decline an event
ClosedPublic

Authored by lpriestley on Apr 29 2015, 11:32 PM.
Tags
None
Referenced Files
F14065796: D12618.diff
Tue, Nov 19, 6:33 AM
F14043733: D12618.diff
Tue, Nov 12, 12:30 PM
F14043075: D12618.id30298.diff
Tue, Nov 12, 7:31 AM
F14005807: D12618.diff
Sun, Oct 27, 7:58 PM
F14004761: D12618.diff
Sun, Oct 27, 2:22 AM
F13974814: D12618.diff
Oct 18 2024, 7:30 AM
Unknown Object (File)
Sep 17 2024, 8:09 AM
Unknown Object (File)
Sep 12 2024, 2:11 PM
Subscribers

Details

Summary

Ref T7986, Ability to join or decline an event.

Test Plan

Open Calendar event, join event, Invitee list should update. Decline event, invitee list should remove you.

Diff Detail

Repository
rP Phabricator
Branch
calendareventjoindecline
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 5601
Build 5620: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

lpriestley retitled this revision from to Ability to join or decline an event.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.

Some nitpicks / suggestions, didn't catch anything substantive.

src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php
7–14

For modern controllers, you can simplify this a bit. Instead of processRequest(), do:

public function handleRequest(AphrontRequest $request) {

Then do this to read the 'id' value:

$request->getURIData('id');
15

In modern code, prefer:

$viewer = $this->getViewer();
22–26

You can remove this, since we aren't requiring CAN_EDIT to join events (just CAN_VIEW).

39

Unused.

70

You can just omit this, the default button name is "Cancel" if you don't pass an alternate name.

src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
72

Now unused.

99

Is there a better icon for this? fa-user-minus or something?

101

No need for $can_edit to join events.

109

As above.

src/applications/calendar/storage/PhabricatorCalendarEvent.php
137–138

If something passes a bad PHID, this could fatal. Maybe do this between these lines:

if (!$invited) {
  return blahblah::STATUS_UNINVITED;
}
This revision is now accepted and ready to land.Apr 29 2015, 11:44 PM
lpriestley marked 10 inline comments as done.
lpriestley edited edge metadata.

Code clean up. Users can now join/decline events.

This revision was automatically updated to reflect the committed changes.