Skip to content

diegojromerolopez/pystats-trello

Repository files navigation

pystats-trello

Statistics and charts for Trello boards.

These small utilities gives you the functionality needed to extract some metric from Trello Kanban boards.

Requirements

See requirements.txt.

Some system packages are required:

Ubuntu

Write this in your terminal:

$ sudo apt-get install python-dev libxml2-dev libxslt1-dev zlib1g-dev libffi-dev

MacOS

TODO

Implemented Kanban Metrics

Time by column

Average time the cards spend in each column.

Very useful to detect bottlenecks in your management process or project.

Forward and backward movements per column

Number of forward movements and bacward movements that have a column as a source.

Cycle

Time between development state and reaching "Done" state.

The average development and deployment time for all tasks of board.

Lead time

Time from start to end ("Done" state).

Time a client has to wait to see a feature he/she asked.

Time each card has been in each column

Based on movement operations, it is computed the time each card is in each column.

Spent and estimated times for each card

Some plugins like Plus for Trello allow the insertion of spent and estimated time values in the comments of each card.

Specifying a regex in the settings_local allow the system to fetch them and interpret them.

Please, note that we have supposed that if there are several comments with different numbers, the numbers must be added. This is the case of Plus for Trello but your case could be different.

Installation

Create a virtualenv and install requirements.txt there.

$ virtualenv venv

Activate the virtualenv and follow next steps.

$ . venv/bin/activate

Install requirements

(venv)$ pip install -r requirements

That's all, now configure your API keys and configure your board.

Configuration

First you have to create a configuration file in the root of the project with the name settings_local.py.

This file will board preferences:

BOARD_NAME: <BOARD NAME>

DEVELOPMENT_LIST: <DEFAULT_DEVELOPMENT_LIST_NAME>

DONE_LIST: <DEFAULT_DONE_LIST_NAME>

CUSTOM_WORKFLOWS:
- <CUSTOM_WORKFLOW_1_NAME>
  - LISTS: <LIST_1A_NAME>, <LIST_1B_NAME>, ... <LIST_1Z_NAME>
  - DONE_LISTS: ... <LIST_1Z_NAME>
- <CUSTOM_WORKFLOW_2_NAME>
  - LISTS: <LIST_2A_NAME>, <LIST_2B_NAME>, ... <LIST_2Z_NAME>
  - DONE_LISTS: ... <LIST_2Z_NAME>

CARD_ACTION_FILTER: [YYYY-MM-DD, YYYY-MM-DD]

CARD_IS_ACTIVE_FUNCTION: <CARD IS ACTIVE CONDITION> (by default is not card.closed)

COMMENT_SPENT_ESTIMATED_TIME_REGEX: PLUS_FOR_TRELLO_REGEX

OUTPUT_DIR: <OUTPUT DIR>

Configuration example

BOARD_NAME: My Tasks

DEVELOPMENT_LIST: Development

DONE_LIST: Done

CUSTOM_WORKFLOWS:
- Tasks waiting pass to deployment server
  - LISTS: Pending pass a deployment server
  - DONE_LISTS: Done

CARD_ACTION_FILTER: [2016-03-01, 2016-04-01]

CARD_IS_ACTIVE_FUNCTION: not card.closed

COMMENT_SPENT_ESTIMATED_TIME_REGEX: PLUS_FOR_TRELLO_REGEX

OUTPUT_DIR: ./results/my-tasks

How to use it

(venv)$ python stats_extractor.py <configuration_file>

Where:
- <configuration_file> is the file path of the configuration file with your preferences.

returns a summary of stats of the board_name.

Output

See output example file in example result file.

Card time by list chart

Average time by list for board cards

Pushed back cards by list

Average time by list for board cards

Moved forward cards by list

Average time by list for board cards

TODO

  • Mark blocked tasks using card comment: Blocked by URL of blocking task.
  • Task hierarchy using card comments:
    • Parent of URL to children task.
    • Child of URL to parent task.

Questions? Suggestions?

Don't hesitate to contact me, write me to diegojREMOVETHISromeroREMOVETHISlopez@REMOVETHISgmail.REMOVETHIScom.

(remove REMOVETHIS to see the real email address)

About

Statistics and charts for Trello boards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages