This script fetches time entries from the Toggl API, parses the description of each entry for Jira issue keys, and creates a corresponding worklog entry in Jira.
Before you begin, ensure you have met the following requirements:
- You have installed Python 3.7 or later.
- You have a Toggl account with API access.
- You have a Jira account with API access.
To install Toggl to Jira Time Entry Exporter, follow these steps:
- Clone the repository
- Install the required Python packages:
pip install -r requirements.txt
To use Toggl to Jira Time Entry Exporter, follow these steps:
- Copy
config.py.dist
intoconfig.py
- Open
config.py
and fill in your Toggl and Jira API credentials. - Run the script:
python3 toggl2jira.py
The script supports the following time entry formats:
-
#TASK_NUMBER TASK_TITLE : ENTRY_MESSAGE
TASK_NUMBER
is the unique number of the Jira taskTASK_TITLE
is the title of the Jira taskENTRY_MESSAGE
is the message that will be attached to the time entry in Jira
-
@TASK_NUMBER TASK_TITLE : ENTRY_MESSAGE
TASK_NUMBER
is the unique number of the Jira taskTASK_TITLE
is the title of the Jira taskENTRY_MESSAGE
is the message that will be attached to the time entry in Jira
The script will parse the time entries based on these patterns and push them to the corresponding Jira tasks.
To run unit tests use following:
pytest test_toggl2jira.py
- ChatGPT-4
- Jan Żaba
If you want to contact me you can reach me at [email protected]
.
This project uses the following license: MIT.