ChromePlugin do Kimai Bridge
Plugin umožňující zaznamenávání časů z ChromePlugin do Kimai.
Toby Batch
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.
- Navigate to the Github issue/project or Trello board, and open any card.
- Activate the extension, the white arrow in a green circle.
- The pop up will say it cannot find a project associated with this board.
- Copy the ID, e.g.
tobybatch_ChromeKimaiBridge
- Log into Kimai as an admin and navigate to the project you want to associate with this project.
- Edit the project, you will find a field call External Board ID
- Enter the board id and save the project.
- Return to the github issue/trello card and activate the extension.
- Log time and view logged history.
The external board id accepts multiple board references in a comma seperated list.
Instalace
Kopírovat soubory
Extract the ZIP file and upload the included directory and all files to your Kimai installation to the new directory:
The file structure needs to look like this afterwards:
Vymazat mezipaměť
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/
You might not need these commands in a shared-hosting environment.
And you probably need to prefix them with sudo
and/or the group might be called different from www-data
.
Aktualizace
Updating the plugin works exactly like the installation:
- Delete the directory
var/plugins/ChromePluginBundle/
-
Execute all installation steps again:
- Kopírovat soubory
- Vymazat mezipaměť