Project

General

Profile

Plugins Directory » Redmine Harvest integration

Author: edward sharp
Website: http://singlemindconsulting.com/blog/edward-sharp/redmine-plugin-syncs-harvest-time-entries
Code repository: https://github.com/singlemind/redmine_harvest_smc
Registered on: 2013-05-03 (about 11 years ago)
Current version: 1.0.0
Compatible with: Redmine 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x
User ratings:   (0)

This plugin is used to sync time entries made in Harvest with issues in Redmine by scanning the notes field of incoming Harvest entries for a 2-5 digit number which would correspond to a Redmine issue ID. When an issue is found it adds time to Redmine accordingly (and attempts to carry over the task name from Harvest). There's also a feature to set custom filters based on some combination the project name, task name, or a string occurrence (regex) in the notes. Entries from Harvest are displayed in the Redmine UI using the jQuery DataTables plugin which offers filtering, paging, and some other snazzy UI elements. The 'lib/tasks/redmine_harvest_smc_rake.sh' file can be put into the system crontab to establish regular sync jobs for all the registered users.

SCREENSHOT:


[[http://i.imgur.com/Mevj0RF.png]]

FEATURES:

  • Sync time entries made in Harvest with issues in Redmine
  • Matches incoming Harvest entries against Redmine issue IDs from active projects
  • Adds time entries to Redmine time tracking report
  • Attempts to match Harvest task name with Redmine time tracking entry description
  • Redmine admin users can see and sync time for all users
  • Time column header cell shows sum total
  • Users can synchronize time using time report 1-click reconciliation of recent entries
  • Cron script for nightly (or more often) syncing
  • Admins can create an exclusion list where matching entries are ignored or associated with some blanket issue (e.g. break time could be added to a single master slip)
  • Time report page has filters (jQuery DataTables)
  • Ensure matched issue IDs are from an active project
  • Harvest admin users sync project and task names from Harvest for easier filtering on settings page

Installation notes

PREREQUISITES:

Redmine 2.x

sudo apt-get install libxslt1-dev
cd /path/to/redmine/plugins/redmine_harvest_smc/
bundle install

or install gems manually:

gem install ezcrypto --no-ri --no-rdoc
gem install on_the_spot --no-ri --no-rdoc
gem install nokogiri --no-ri --no-rdoc

INSTALL

1. Copy your plugin directory into #{RAILS_ROOT}/plugins (Redmine 2.x) or #{RAILS_ROOT}/vendor/plugins (Redmine 1.x). If you are downloading the plugin directly from GitHub, you can do so by changing into your plugin directory and issuing a command like git clone git://github.com/user_name/name_of_the_plugin.git.

2. Update the password & salt used to encrypt Harvest usernames and passwords. Lines ~31,32,46, and 47 of app/models/harvest_user.rb

3. If the plugin requires a migration, run the following command to upgrade your database (make a db backup before).

3.1. For Redmine 2.x:

rake redmine:plugins:migrate RAILS_ENV=production

4. Restart Redmine

You should now be able to see the plugin list in Administration -> Plugins and configure the newly installed plugin (if the plugin requires to be configured).

5. Enter your Harvest subdomain (e.g. http://subdomain.harvestapp.com/) on the settings page for this plugin

6. Enter your Harvest credentials on the “Harvest User” page linked in the top header menu in Harvest.

UNINSTALL

1. If the plugin required a migration, run the following command to downgrade your database (make a db backup before):

1.1. For Redmine 2.x:

rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production

2. Remove your plugin from the plugins folder: #{RAILS_ROOT}/plugins (Redmine 2.x)

3. Restart Redmine

Changelog

1.0.0 (2013-05-01)

Compatible with Redmine 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x.