Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
coldic3 committed May 17, 2024
1 parent 8d45e84 commit 1e4e157
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Use this simple CLI app to import your work logs into the [Worklogs](https://marketplace.atlassian.com/apps/1219004/worklogs-time-tracking-and-reports) Jira app.

For now, the only import file supported is an export file from a [Toggl](https://toggl.com) app. See [toggl_sample_export.csv](toggl_sample_export.csv) file.
For now, you can import your work logs only from Toggl or from CSV file.

The import file supported is an export file from a [Toggl](https://toggl.com) app. See [toggl_sample_export.csv](toggl_sample_export.csv) file.

## Setup

Expand All @@ -11,14 +13,34 @@ For now, the only import file supported is an export file from a [Toggl](https:/
cp .env.dist .env
```

1. Open the `.env` file in a text editor and replace the placeholders with your actual data:
1. Open the `.env` file in a text editor and replace the placeholders with your actual data.

Env variables prefixed with `ATLASSIAN_` are required:
* `ATLASSIAN_DOMAIN`: Your Atlassian domain.
* `EMAIL`: Your email address used for Atlassian access.
* `API_TOKEN`: Your API token for Atlassian access.
* `ATLASSIAN_EMAIL`: Your email address used for Atlassian access.
* `ATLASSIAN_API_TOKEN`: Your API token for Atlassian access.

Env variables prefixed with `TOGGL_` are optional if you use an `--import` option only:
* `TOGGL_API_TOKEN`: Your API token for Toggl access.
* `TOGGL_USER_ID`: Your user ID in Toggl.
* `TOGGL_CLIENT_ID`: The client ID in Toggl from whom you want to export your work logs.
* `TOGGL_WORKSPACE_ID`: Your workspace ID in Toggl from whom you want to export your work logs.

## Usage

Run:
```
./bin/jira-worklogs-importer --import=toggl_sample_export.csv
```

## Troubleshooting

### Where can I find these user, client and workspace IDs in Toggl?

Well, these IDs are not visible in the Toggl UI however you can easily see it in the address bar in your browser.

1. Open detailed reports in Toggl: https://track.toggl.com/reports/detailed
2. In filters select as follows:
1. Member => you
2. Client => the client from whom you want to export you work logs
3. Your URL in the address bar in your browser should be like this: https://track.toggl.com/reports/detailed/{TOGGL_WORKSPACE_ID}/clients/{TOGGL_CLIENT_ID}/period/thisWeek/users/{TOGGL_USER_ID}

0 comments on commit 1e4e157

Please sign in to comment.