Skip to content

Reporting for projects across multiple Harvest accounts

Notifications You must be signed in to change notification settings

sc0ttman/harvester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Harvester

Simple Rails app used to consolidate timesheet reports for shared projects across multiple Harvest accounts.

Installation

$ bundle install

Create local database harvester_development

$ rails db:migrate

Rename config/application.yml.example to config/application.yml and fill in Harvest account info.

# Follow the naming convention: "harvest_<namewithoutspaces>_<config_var>"
harvest_mycompany_subdomain: myharvestsubdomain
harvest_mycompany_username:
harvest_mycompany_password:
harvest_mycompany_project_id: '<grab id from project url>'

harvest_partner_subdomain: mypartnersharvestsubdomain
harvest_partner_username:
harvest_partner_password:
harvest_partner_project_id: '<grab id from partner project url>'

harvest_anotherpartner_subdomain: ...

Note: Try restarting Spring if changes aren't taking effect: $ spring stop

Seed your Organizations and Admin users:

$ rails db:seed

Run Redis and Sidekiq in seperate terminals:

$ redis-server
$ bundle exec sidekiq -q default -q mailers

Sync the Harvest data:

$ rails sync:all # This will create a job in Sidekiq but should be picked up right away

Open your app: http://harvester.dev

Deploying to Heroku

You must first install the addons:

$ heroku create
$ heroku ps:scale web=1

# Import config vars from yml
$ figaro heroku:set -e production

# Verify config vars are set (Harvest accounts, REDIS_URL, DATABASE_URL)
$ heroku config

$ git push heroku master
$ heroku run rake db:migrate
$ heroku run rake db:seed
$ heroku run rake sync:all
$ heroku open

Scheduling on Heroku

# Install and launch the addon
$ heroku addons:create scheduler:standard
$ heroku addons:open scheduler

Then just create a new job and add the command rake sync:all

TODO

  • Build config CRUD
  • Fuzzy task name matching between organizations (currently has to be exact)
  • Polling for new timesheet entries only (currently nukes everything)
  • Caching report calculations

About

Reporting for projects across multiple Harvest accounts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published