Coder Social home page Coder Social logo

toggl-jira-auto-logger's Introduction

JIRA + Toggl Auto Logger

This repository has a simple python script that creates worklogs on JIRA based on entries/timelogs on Toggl.

(i) The name/description of your Toggl entry must be equal to the JIRA's Issue ID (eg. PROJ-111)

Configuration

Python Requirements

You need python 3.0+ for this project to be run on your machine. All requirements are listed on the requirements.txt file. You can install all the requirements of this project using pip as decribed below :

Linux:

> $ python3 -m venv venv # Optional (but recommended) creation of virtual environment for the project
> $ source venv/bin/activate # Activation of the created virtual environment
> $ pip install -r requirements.txt # Recursively install all requirements listed on file

Windows:

> $ python3 -m venv venv # Optional but recommended creation of virtual environment for the project
> $ .\venv\Scripts\activate.bat # Activation of the created virtual environment
> $ pip install -r requirements.txt # Recursively install all requirements listed on file

For the deactivation of the virtual environment, for both Windows and Linux, simply execute $ deactivate on the terminal.

Tokens

You need to provide some tokens and informations that allows the code to sucessfully authenticate and manage timelogs on your JIRA and Toggl accounts. These informations need to be set to the related variable, which are:

TOGGL_API_TOKEN

Toggl's API token, to allow the script to use the Toggl's API to get your log entries. This can be found in your Profile Page:

Toggl profile path Toggl API key

JIRA_SERVER

The complete url of your JIRA server, eg. https://yourcompanyname.atlassian.net

JIRA_MAIL

Your JIRA user e-mail

JIRA_API_TOKEN

JIRA's API token, to allow the script to use the JIRA's API to log your time entries. This can be found in your Account Settings > Security > Create and manage API tokens:

JIRA profile path JIRA profile path 2 JIRA token creation

TIME_DELTA_DAYS

The Toggl's entries time delta related to the day of script execution. It represents the quantity of days before the moment of execution that will be considered for all the worklog entries.

Executing the Script

After installing all the requirements and setting all the required variables to their correct values, you can simply run the main.py script with your python command:

$ python main.py

There are (rudimentary) logs that will be displayed on the terminal executing the script, which can be used for debuging.

Limitations

  • The Toggl's entry name/description must be the same as the JIRA's Issue ID
  • The script controls which entries were logged using a tag named 'logged'
  • No worklog description can be logged on JIRA
  • No error management

toggl-jira-auto-logger's People

Contributors

jotatri avatar

Stargazers

Lucas Santos avatar

Watchers

 avatar

Forkers

lsantos06

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.