Map YouTrack issues to Google Calendar events.
- Per-user synchronisation: calendar events are created in the user-specified calendar and only for issues assigned to the user.
- Immediate synchronisation of issue updates, including start date-time, duration and the summary.
- Support for Google Calendar reminders.
- Support for "All-day" events.
- Events corresponding to resolved issues change colours!
- If the issue is deleted, the corresponding event is deleted as well.
| Field name | Field type | Description |
|---|---|---|
| Assignee | User | Calendar events are created in the issue assignee's calendar, if configured. |
| Start datetime | dateTime | If not specified, the event isn't created. |
| Estimation | period | If not specified, the event is "All-day". |
| Remind before | period | |
| Calendar Event ID | string | Google Calendar event's ID. |
Calendar changes are made by a Google Cloud app. To communicate with the app, an access token is required. In order to obtain the token, the user first authorises to the app and receives back an authorisation code. The code is used by this YouTrack app to obtain a refresh token. The refresh token is stored indefinitely in the app (as a user property, in fact) and used to periodically obtain the desired access tokens.
Google Calendar access is somewhat involved.
- Create a Google Cloud project
- In the Google Cloud console, enable the Google Calendar API
- Configure the OAuth consent screen
- Authorize credentials
- Click "Create client"
- Select "Application type": "Desktop app"
- Enter "Name": arbitrary, e.g. "YouTrack"
- Make sure to save the Client ID and Client secret
- While the project is in testing mode, add users manually, or make the app public
(source)
Install the app from the Market or by running
./build_zip.shand installing the resulting ZIP archive manually.
Go to the app settings and
- Specify Google OAuth Client ID and Google OAuth Client secret
- Select applicable projects
Finally, for the selected projects add the issue fields as specified in the Required Issue Fields section above.
Go to User profile -> Google Calendar Sync Settings and follow the instructions. Basically,
- Authorise with Google Calendar App
- Paste the authorisation code
- Select the calendar & Click Save Calendar ID
See workflow logs and the browser console.
Google only allows one active refresh token per user/app combination. To re-authenticate, revoke the authentication manually (see this post).
- (#11) All-day events are created in the UTC timezone. E.g. if the user's timezone
is 'UTC+1', creating an issue with
Start datetime= 2020-01-02 00:00:00 and an undefinedEstimationwill actually create an all-day event at 2020-01-01. Workaround: useStart datetimeat least 2020-01-02 01:00:00.