גישור בין Kimai לתוסף בכרום

תוסף שמאפשר להעביר שעות שתועדו בתוסף כרום לעותק של Kimai.

Toby Batch
מוצע על ידי
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.

  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.

התקנה

העתקת קבצים

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 ...

פינוי המטמון

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.

עדכונים

Updating the plugin works exactly like the installation:

  • Delete the directory var/plugins/ChromePluginBundle/
  • Execute all installation steps again:
    • העתקת קבצים
    • פינוי המטמון
מוצע על ידי

Toby Batch

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

לשאלות ניתן לפנות לאמצעי הקשר המפורטים כדי לתקשר עם המפתחים ישירות.
Top