diff --git a/README.md b/README.md index ec25769..279c7df 100644 --- a/README.md +++ b/README.md @@ -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 @@ -11,10 +13,18 @@ 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 @@ -22,3 +32,15 @@ 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}