Page MenuHomePhabricator

Implement Google Calendar v3 API into Calendar
Open, WishlistPublic

Tokens
"Cup of Joe" token, awarded by chad."Mountain of Wealth" token, awarded by fernofry."Cup of Joe" token, awarded by yelirekim."Love" token, awarded by robertkraig."Like" token, awarded by aristedes."Like" token, awarded by cmmata."Love" token, awarded by 20after4."Mountain of Wealth" token, awarded by tycho.tatitscheff."Like" token, awarded by lavahot."Mountain of Wealth" token, awarded by allan.laal.
Assigned To
Authored By
chad, Jan 18 2013

Description

Task Overview

We'd like to add to Calendar the ability to support external Calendar sources. Ideally this would both read and write both ways. So if I create an event in Phabricator, it would update my Google Calendar and vise versa. The overall goal is many small companies use Google to manage their work calendar, and that information automatically synced to Phabricator is handy.

For this task you will need a Google account if you do not have one::
https://accounts.google.com/SignUp

You will then need to register with Google APIs:
https://code.google.com/apis/console/b/0/?pli=1#access

Go to Services in API Project and turn on Calendar API.

Getting started on implementation:
https://developers.google.com/google-apps/calendar/
https://developers.google.com/google-apps/calendar/firstapp
https://code.google.com/p/google-api-php-client/
https://developers.google.com/google-apps/calendar/instantiate

Google provides both a REST API and PHP Client Library
@epriestley to confirm which approach.

Authenticating

Similiar to Settings:
https://secure.phabricator.com/settings/

We want to add 'Linked Accounts' to the side nav in Calendar. It should for now just list Google and have a similar workflow to linking external profile accounts. My poor understanding is you will just use OAuth 2 by Google, which we should have existing infrastructure for. More details: https://developers.google.com/google-apps/calendar/auth

Design

Google Calendar uses multiple Calendars to display data. 'Home', 'Work', 'Holidays', etc. To keep this task simple, I'd lean towards having the user pick one Calendar to sync to. If they have multiple, they need to select which Calendar. When they've selected a Calendar from Google to sync with, we should import all their Calendar data on Google into their Phabricator Calendar.

Recurring Events

I think this will likely be a pre-requisite task I will attach. We'll need to add recurring event support into Phabricator, and do it in a standard way so that it is compatible with other Calendars. The spec is a good place to start. PHP iCalendar also has a recurring event parser.

http://googleappsdeveloper.blogspot.com/2011/12/calendar-v3-best-practices-recurring.html
http://tools.ietf.org/html/rfc5545
http://sourceforge.net/projects/phpicalendar/

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
chad added a comment.Apr 3 2013, 12:18 AM

Yeah I don't think CalDav is worth putting time into at this point. Calendar standards seem to not really gone anywhere and people seem to just use Google or Microsoft.

Seems reasonable.

I think this task isn't specified in enough detail for the students right now -- we should either remove the project tag or provide more concrete guidance like in these tasks: T2749, T2744, T2743, T2626 (e.g., which objects to build, what their responsibilities should be, roughly what the resulting UI should look like).

chad added a comment.Apr 3 2013, 12:24 AM

If we want to change this to 2 way support with Google API, I can write up the description and add some mocks. Assuming we're in agreement here?

chad claimed this task.Apr 3 2013, 12:53 AM
chad removed a project: OS Students 2013.
chad renamed this task from Add external Calendar support to Implement Google Calender v3 API into Calendar.Apr 5 2013, 5:08 PM
chad updated the task description. (Show Details)
chad updated the task description. (Show Details)Apr 5 2013, 5:23 PM
chad updated the task description. (Show Details)Apr 5 2013, 5:36 PM

One design issue is the current status has a limitation or two. For example, you can't have overlapping status events. Another is there's no notion of "accepted", "maybe", "declined" which is probably important v2 calendar functionality. It might be best to build a more generic "calendar" back-end for this and migrate status over / otherwise sort out how that works with calendar events.

chad added a comment.Apr 5 2013, 6:13 PM

Yeah, I'm going to create more tasks to better get our Calendar into a more standard backend that need completed before this.

chad edited this Maniphest Task.Apr 5 2013, 11:25 PM
chad edited this Maniphest Task.Apr 5 2013, 11:27 PM
chad edited this Maniphest Task.
epriestley edited this Maniphest Task.Apr 17 2013, 10:36 PM

Adding Google Calendar support would make the Calendar immediately useful to a lot of people. Right now the Calendar is just isolated and thus largely unusuable. Eventually it would be great to add task deadlines and milestones to the Calendars (if/when these features are added).

mim added a subscriber: mim.May 15 2014, 9:56 PM
chad removed chad as the assignee of this task.May 21 2014, 5:46 PM
qgil renamed this task from Implement Google Calender v3 API into Calendar to Implement Google Calendar v3 API into Calendar.Oct 30 2014, 8:13 PM

Well, I think that the most useful feature in the immediate term would be to allow phabricator to export a calendar url to import into your google calendar. Then google-calendar would just periodically update your information. I know that liquidplanner current supports an export ics url, which you import into google-calendar.

Are you also planning a way to manage Phabricator's calendar using standard email programs? I.e. will it be possible to embed the Phabricator calendar into Akonadi (and thus KMail) or Thunderbird/Lightning? I assume this would require that Phabricator exposes a CalDAV API.

eadler added a subscriber: eadler.May 2 2015, 2:43 AM
lavahot added a subscriber: lavahot.EditedJun 12 2015, 8:43 AM

@epriestley, You can't send this to v2 because it blocks T7924 through T7929. Huh, a task dependency tree tool might be cool.

lpriestley closed subtask Restricted Maniphest Task as Resolved.Jun 23 2015, 4:16 PM
20after4 added a subscriber: 20after4.
robla added a subscriber: robla.Sep 12 2015, 8:27 PM
cmmata added a subscriber: cmmata.Feb 16 2016, 9:16 AM
dtf added a subscriber: dtf.Feb 16 2016, 10:03 AM
chad changed the visibility from "All Users" to "Public (No Login Required)".Feb 16 2016, 3:13 PM
BYK added a subscriber: BYK.Apr 13 2016, 7:10 PM
aristedes added a subscriber: aristedes.
epriestley claimed this task.
epriestley added a project: Prioritized.

So CalDAV support (for iCloud and others) is not planned? Google Calendar API is propritary while CalDAV is a standard. There is a really good php implementation of client/server and card parsers: https://github.com/fruux/sabre-dav
@devurandom yes that is true, and it is really simple using save/dav.

chad added a comment.Jul 27 2016, 6:34 PM

See T7924 for current Calendar roadmap items.

eadler added a project: Restricted Project.Jul 27 2016, 6:49 PM

I'm super excited about this feature.

gou1 added a subscriber: gou1.Aug 26 2016, 9:31 AM
epriestley moved this task from Backlog to The Queue on the Prioritized board.Oct 13 2016, 2:20 PM
chad awarded a token.Oct 13 2016, 4:55 PM

I'm so excited about this ticket :)

hskiba added a subscriber: hskiba.Apr 3 2017, 12:21 PM
urzds added a subscriber: urzds.Jul 12 2017, 11:16 AM

Is there someone working on this feature?