Skip to content

About

reads time entries out of Harvest and logs time to Jira

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

harvest-to-jira

Exports time entries from the Harvest timelogging tool to Jira as worklog items.

Usage

I recommend using volta to manage node versions when using this tool.

Install node dependencies with the following command:

npm i

Run the tool with:

npm start

Run options:

  • week: input is taken as a date; the tool will then calculate the Sunday-to-Sunday window within which the chosen date falls. This is the date range it'll use for exporting time entries
  • dry run: when run in "dry" mode, the tool will log Jira worklog items to the console instead of sending them to the Jira API
  • path to config file: path to your configuration file

Configuration

Setup

  1. Copy the example file:
    cp config/projects.example.json config/projects.json
    
    The real config/projects.json is gitignored.
  2. Replace each <your-…> placeholder with the real value (see field reference below).
  3. Run npm start. If you miss a field or fat-finger a value, the tool prints exactly what's wrong and where to find each value before exiting.

Field reference

user (required)

Field Type Required Where to find it
harvestAccessToken string Yes Create a personal access token at id.getharvest.com/developers.
harvestAccountId number No (auto-derived) Auto-derived from the access token at startup. Only set this if your token has access to multiple accounts and you want to pin a specific one. Must be set together with harvestUserId.
harvestUserId number No (auto-derived) Auto-derived from the access token at startup. Only set this if you're pinning a specific account. Must be set together with harvestAccountId.

projects[] (required, one entry per Harvest↔Jira project pairing)

Field Type Required Where to find it
harvestId number Yes Open the project in Harvest's Reports tab — the numeric ID is in the URL on the project's detail page.
jiraProjectKey string Yes The prefix of your Jira issue keys, e.g. "CG" for issues like CG-1234.
atlassianDomain string Yes The subdomain of your Jira URL — e.g. "lwd" if you log in at lwd.atlassian.net.
atlassianApiToken string Yes Create one at id.atlassian.com/manage-profile/security/api-tokens.
atlassianAccountEmail string Yes The email address you use to log in to Jira.

If your Atlassian credentials differ between Jira workspaces, just give each project its own values — they don't have to match across the array.

Need help? Wanna contribute?

Please don't hesitate to reach out! I wrote this tool for personal use when I was feeling particularly lazy (the time spent on it so far probably won't pay off), so it's a bit rough around the edges.

About

reads time entries out of Harvest and logs time to Jira

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages