Gratuit

Prix pour cet article

Offert par

Logo - Toby Batch

Toby Batch

Neontribe is a software development company. We're agile and user-centered in our design and development work, producing websites and apps.

If you have any question, visit the developers homepage .
This plugin allows time to logged from ChromePlugin tickets into a Kimai instance.

ChromePlugin to Kimai Bridge

This plugin allows time to be logged from ChromePlugin tickets into a Kimai instance.

  • Allows a Kimai instance to be accessed from a browser pop up
  • Log time attached to specific Trello card or Github issue
  • View time logged against a card or issue

Installation

The plugin

Clone the repo into your plugins folder of a Kimai installation (it must be in a folder named ChromePluginBundle:

cd /path/to/kimai
cd var/plugins
clone https://github.com/tobybatch/ChromeKimaiBridge.git ChromePluginBundle

Reload the plugins:

cd /path/to/kimai
./bin/console kimai:reload

The chrome extension

Right now it’s not in the chrome store, it will be, but for now there is a packed crx file in the var/plugins/ChromePluginBundle/Resources/ folder. Because the extension needs to access your Kimai instance it has to have the hosts: https://*/* permissions which google (quite correctly) finds very permissive and this holds up getting it into the store.

Get it here.

Set up

This will add a new icon to your chrome extensions. The first time you click it you will launch the options page. Here you must add a URL pointing to the web root of you Kimai server. Save the options and then you can use the extension.

Linking to Trello/Github

Time can be logged directly against a project from a Github issue/project or Trello board.

  1. Navigate to the Github issue/project or Trello board, and open any card.
  2. Activate the extension, the white arrow in a green circle.
  3. The pop up will say it cannot find a project associated with this board.
  4. Copy the ID, e.g. tobybatch_ChromeKimaiBridge
  5. Log into Kimai as an admin and navigate to the project you want to associate with this project.
  6. Edit the project, you will find a field call External Board ID
  7. Enter the board id and save the project.
  8. Return to the github issue/trello card and activate the extension.
  9. Log time and view logged history.

The external board id accepts multiple board references in a comma seperated list.

Installation

Copier les fichiers

Extract the ZIP file and upload the included directory and all files to your Kimai installation to the new directory:

var/plugins/ChromePluginBundle/

The file structure needs to look like this afterwards:

var/plugins/
├── ChromePluginBundle
│   ├── ChromePluginBundle.php
|   └ ... more files and directories follow here ...

Effacer le cache

After uploading the files, Kimai needs to know about the new plugin. It will be found once the cache was re-built. Call these commands from the Kimai directory:

How to reload Kimai cache

bin/console kimai:reload --env=prod

It is not advised, but in case the above command fails you could try:

rm -r var/cache/prod/*

You might have to set file permissions afterwards:

Adjust file permission

You have to allow PHP (your webserver process) to write to var/ and it subdirectories.

Here is an example for Debian/Ubuntu (to be executed inside the Kimai directory):

chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/

Test Kimai before executing these commands (they are likely not required in a shared-hosting environment). You probably need to prefix them with sudo and the group might be called different than www-data.

Mises à jour

Updating the plugin works exactly like the installation:

  • Delete the directory var/plugins/ChromePluginBundle/
  • Execute all installation steps again:
    • Copier les fichiers
    • Effacer le cache