Redmine GC sync for Mega Calendar Plugin
I'm not a ruby programmer, so i'm started from Redmine GC Sync
================
-
Clone this repository into
{REDMINE_ROOT}/plugins/
git clone https://github.com/riccardonar/mega_calendar_gc_sync.git
-
Install dependencies and migrate database
cd redmine/ bundle install rake redmine:plugins:migrate RAILS_ENV=production
-
Restart your Redmine web server
service apache2 restart
Go to Administration > Plugins > Mega Calendar: Gc Sync plugin : Configure
and follow the steps.
- Go to the GOOGLE DEVELOPPERS CONSOLE.
- Select a project, or create a new one.
- In the sidebar on the left, expand APIs & auth. Next, click APIs. In the list of APIs, make sure the status is ON for the Calendar API
- In the sidebar on the left, select Credentials.
- In either case, you end up on the Credentials page and can create your project's credentials from here.
- If you haven't done so already, create your OAuth 2.0 credentials by clicking Create new Client ID under the OAuth heading. Next, look for your application's client ID and client secret in the relevant table.
- Visit Google Calendar in your web browser.
- In the calendar list on the left, click the down-arrow button next to the appropriate calendar, then select Calendar settings.
- In the Calendar Address section, locate the Calendar ID listed next to the XML, ICAL and HTML buttons.
- Copy the Calendar ID.
Create a custom filed to fill user google calendar address: go Administration > Custom Fields > add
and set it as Text field
For each user you can set the email address of his calendar
After the configuration of the plugin, a filter part will appear :
Set the custom field used for google calendar email and which Status you want to sync
Thera are some rake task:
-
gc_sync_add to run just one time to synchronize all issues and events that repect the filter rule you configured
- run this on the redmine root
rake gc_sync_add:exec RAILS_ENV="production"
-
gc_sync_del to run just one time to delete all syncronized Issues and Events
- run this on the redmine root
rake gc_sync_del:exec RAILS_ENV="production"
-
gc_sync_get to run in cron to update date and time of previous syncronized Issues and Events from Google Calendar
- run this on the redmine root
rake gc_sync_get:exec RAILS_ENV="production"
``` rake redmine:plugins:migrate NAME=mega_calendar_gc_sync VERSION=0 RAILS_ENV=production ```