Replicate toggl time entries to Jira worklogs
Project description
toggl2jira
CLI application to replicate toggl time entries to Jira worklogs
Install
TODO: Update to pipx/pypi
- Clone this repository
- Install python requirements
python3 -m pip install -r requirements.txt - Configure application (see below)
- (optional) Setup a regular task to fully automatic sync your tasks
Usage
Start each Toggl entry with a Jira issue reference followed by a slash to enable worklog sync for this time entry.
Example:
MYPROJECT-1337/This text will also be synced to Jira
Just run the sync script to sync all time entries within the configured sync window. This action is idempotent and can be executed multiple times without problems.
Configuration
Configure by setting environment variables or creatng a .env file in the script directory. See .env.example for a template.
| Config | Default | Description |
|---|---|---|
JIRA_URL |
required | Base URL to your Jira Server Instance (e.g. https://jira.example) |
JIRA_ACCESS_TOKEN |
required | Jira personal access token. See Jira Docs |
JIRA_PROJECT_SLUG |
required | Jira project slug that is considered for sync |
TOGGL_URL |
"https://api.track.toggl.com" |
Toggl API base URL |
TOGGL_API_KEY |
required | Toggl API key. See Toggl Docs |
SYNC_WINDOW_SIZE |
1 |
Amount of days, the sync will look in the past |
Setup Examples
launchd (MacOS)
- Create LaunchAgent config
<!-- /Users/###user###/Library/LaunchAgents/com.github.schlakob.toggl-jira-sync.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.schlakob.toggl-jira-sync</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/python3</string>
<string>/path/to/toggl-jira-sync/sync.py</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
<key>StandardOutPath</key>
<string>/path/to/code/toggl-jira-sync/out.log</string>
<key>StandardErrorPath</key>
<string>/path/to/code/toggl-jira-sync/err.log</string>
</dict>
</plist>
- Enable and start LaunchAgent
launchctl bootstrap gui/$(id -u) /Users/<user>>/Library/LaunchAgents/com.github.schlakob.toggl-jira-sync.plist
launchctl kickstart -k gui/$(id -u)/com.github.schlakob.toggl-jira-sync
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toggl2jira-1.0.0.tar.gz.
File metadata
- Download URL: toggl2jira-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dee872737a62cffb63007e7810b69c60ad483c87c93095bd956b811fbf67b92a
|
|
| MD5 |
27cdf7a53f488ad958ae0302ba706ea2
|
|
| BLAKE2b-256 |
56ada324ebf1ab37a544aafb6c0694e1b5691b745a71209915eb2ca24bea03d4
|
Provenance
The following attestation bundles were made for toggl2jira-1.0.0.tar.gz:
Publisher:
python-publish.yml on schlakob/toggl2jira
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toggl2jira-1.0.0.tar.gz -
Subject digest:
dee872737a62cffb63007e7810b69c60ad483c87c93095bd956b811fbf67b92a - Sigstore transparency entry: 179683159
- Sigstore integration time:
-
Permalink:
schlakob/toggl2jira@d8443cdd08b0fe3b2f25dca24fa4a8205d8335a4 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/schlakob
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d8443cdd08b0fe3b2f25dca24fa4a8205d8335a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file toggl2jira-1.0.0-py3-none-any.whl.
File metadata
- Download URL: toggl2jira-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6de68ab818bc436ceca9b6a711aa030ab93317a3a6e83162c375aa339f7a8d76
|
|
| MD5 |
9d7f5a0170bf72eda6ff392698bc9091
|
|
| BLAKE2b-256 |
6a18ae5eaec3b5612edcd2b8f2d4d0068caa0a55f6a492227568d5c13cf3639b
|
Provenance
The following attestation bundles were made for toggl2jira-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on schlakob/toggl2jira
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toggl2jira-1.0.0-py3-none-any.whl -
Subject digest:
6de68ab818bc436ceca9b6a711aa030ab93317a3a6e83162c375aa339f7a8d76 - Sigstore transparency entry: 179683161
- Sigstore integration time:
-
Permalink:
schlakob/toggl2jira@d8443cdd08b0fe3b2f25dca24fa4a8205d8335a4 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/schlakob
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d8443cdd08b0fe3b2f25dca24fa4a8205d8335a4 -
Trigger Event:
push
-
Statement type: