Giter Site home page Giter Site logo

gtimelog2odoo's Introduction

GTimeLog Exporter

This helper is designed to push the attendances and worklogs from GTimeLog respectively to Odoo and Jira.

Usage

usage: exporter.py [-h] [-c CONFIG] [-w WEEK] [-y YEAR] [--no-interactive]

  • -c : Configuration file location (default: ./gtimelogrc)
  • -w : Week number to synchronize (default: current week /!\ Python based)
  • -y : Year of the week to synchronize (default: current year)
  • --no-interactive : Do not prompt for passwords or confirmations

TIP: Week number can be a negative number like -1 to use previous week. The year will be computed automatically based on current year. -y parameter will be ignored.

For instance: if current week is the 1st of 2020 and you push -w 2 it will push week 51 of 2019.

Configuration file

By default, the script will look for the configuration file in the same folder as itself. You can change the location with the parameter described above.

After getting the script, copy the file gtimelogrc.example to gtimelogrc and add your changes.

Aliases

You can add as many aliases as you want in the corresponding configuration file section. Each alias is a key/value combination:

daily_alias = BSDEV-42

Passwords

Upon script execution, you will be prompted for your Odoo and Jira passwords.

You can also use ODOO_PASSWORD and TEMP_PASSWORD environment variables to pass to the script. If both passwords are the same, you can use the environment variable ALL_PASSWORD. In case the flag non-interactive is set, it is mandatory to use environment variables.

TIP: copy set_passwords.example to set_passwords and modify it according to your LP passwords. Then run it to set both passwords on the fly with:

. ./set_passwords

GTimeLog Entry Format

The script will parse GTimeLog entries with the following format:

[TASK|alias for a task]: description | comment

or if you want to keep the category for your own usage:

category: [TASK|alias for a task] description | comment

Where

  • "TASK" is the card ID on JIRA, eg: "BSMNT-1"
  • "alias for a task" is an alias matching your alias configuration, eg: "mgmt" => BS-445
  • "description" is what you have done
  • (opt) "comment" will be stripped and won't be pushed to Tempo

if line_format is categorized

  • (opt) "category" for instance a project name it won't be pushed

configuration option:

Examples

  • Log work to task BSMP-42 with description "Investigate Issue"

    BSMP-42: Investigate issue

  • Log work to task aliased by daily with description "Daily Meeting"

    daily: Daily Meeting

Roadmap

  • Check if conflicting worklogs could be updated instead of deleting and recreating them
  • Update the remaining estimate on the Jira task instead of setting it to 0
  • Optimize logs aggregation
  • Better error management
  • Build a package

gtimelog2odoo's People

Contributors

p-tombez avatar simahawk avatar yvaucher avatar

Watchers

 avatar  avatar

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.