It is a small application which can be executed manually or via crontab. This application will export your toggl.track report for selected time period to the work-logs of your Jira project. I wrote this app because, from my point of view the Jira work-log UI is not useful. You can install toggl.track browser extension and this will be way better than the "work-log" input form from Jira.
As each application, my app also requires some things to be done, before the execution.
release.zip
, unzip it and select the binary for your operating system from the bin
folder and copy it to the ~/toggl-to-jira
folder in your system. Of course, it is up to you, what kind of folder select..env
~/toggl-to-jira
(or your path) and run the following command:
./toggl-to-jira-{system}
Recommendation is to copy contents from .env.example to the .env
file in the ~/toggl-to-jira
(or your path) folder
In this dummy contents you can see the following variables:
TOGGL_API_TOKEN
- see here how to create the tokenTOGGL_API_URL
- the API URL https://api.track.toggl.comTOGGL_DEFAULT_WORKSPACE_ID
- just go to your toggl.track account and visit Reports page, there in the address URL you will see the ID. Here is an example https://track.toggl.com/reports/summary/{WORKSPACE_ID}/period/thisWeek
JIRA_APP_TOKEN
- click here to see how generate the tokenJIRA_EMAIL
- your Jira account emailJIRA_BASE_URL
- the workspace URL https://your-company.atlassian.netThe main approach is:
/reports/api/v2/details?workspace_id={workspace_id}&user_agent={user_agent}&since={date_from}&until={date_to}
Please, also have a look at the flowchart diagram:
date_from
- The starting date for the filter export. Please use next format: YYYY-MM-DD (default "2021-03-27")date_to
- The ending date for the filter export. Please use next format: YYYY-MM-DD (default "2021-03-27")workspace_id
- The workspace ID which should be used for the toggl.track data report generation. By default, will be used the ID from TOGGL_DEFAULT_WORKSPACE_ID environment variable.Please use --help
for more details.
There are conditions, when the application ignore the received time entry:
KEY-1100
Cannot run the app in MacOS Big Sur
Security & Privacy
settings~/Downloads
it is a system folder. Create a new folder in ~/
path and run the application from there.I receive error "It looks like there are problems with config. Stop running the script"
Please, make sure you defined all required environment variables. You can find the list of them in .env.example
.
I would recommend use this application with combination of toggl.track browser extension, which you can find here. And also I would recommend to set the crontab event for your application execution, so you will not care about the work-log sync anymore.
The same thing I did on my PC. I installed the app into crontab to send the Jira report every 2 hours, so I don't bombard Jira and Toggl.track APIs. Plus, in my browser I installed the Toggl.track browser extension and enabled in the extension settings Jira support like in the image below: At the end, for all tasks in Jira I have a button to start/stop the timer and all my working hours are in sync. It is free and very useful.