A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.

Overview

GitLabBundle

A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.

Installation

First clone it to your Kimai installation plugins directory:

cd /kimai/var/plugins/
git clone https://github.com/LibreCode/GitLabBundle.git

And then rebuild the cache:

cd /kimai/
bin/console cache:clear
bin/console cache:warmup

You could also download it as zip and upload the directory via FTP:

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

How to use?

Configuring

GitLab settings

Project settings

  • Get the GitLab project id going to GitLab repository

    settings

  • Edit or create a Kimai project associated to GitLab repository and fill the GitLab project ID:

    settings

    PS: You only will see this field if you configure the GitLab private token

Associate specific timesheet to GitLab

  • On create or edit form you will see the GitLab issue ID field:

    settings

    PS: You only will see this field if you configure the GitLab private token

Results

  • After you save a entry on Kimai with GitLab issueId you will see the spend time on GitLab

    settings

How it works?

When you do any of these actions:

  • TimesheetCreatePostEvent
  • TimesheetUpdatePostEvent
  • TimesheetDuplicatePostEvent
  • TimesheetStopPostEvent
  • TimesheetDeletePreEvent

The plugin will identify if it has an issueId, having issueId a query will be performed to add the time spent of all records in the project that have an issueId equal to the issueId sent.

Two requests will be made to GitLab:

  1. Reset time spent
  2. Define the total time spent
You might also like...
List of Magento extensions with known security issues.
List of Magento extensions with known security issues.

Magento Vulnerability Database List of Magento 1 and 2 integrations with known security issues. Objective: easily identify insecure 3rd party software

Fixes WordPress 5.9 global CSS styles specificity issues

Fixes WordPress 5.9 global CSS styles specificity issues

Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.

PhpDeprecationDetector PhpDeprecationDetector - analyzer of PHP code to search usages of deprecated functionality in newer interpreter versions - depr

A tool to automatically fix PHP Coding Standards issues
A tool to automatically fix PHP Coding Standards issues

PHP Coding Standards Fixer The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP codi

Shortest Path - have a function ShortestPath (strArr) take strArr which will be an array of strings which models a non-looping Graph.

Have the function ShortestPath(strArr) take strArr which will be an array of strings which models a non-looping Graph

⚡️ A WordPress plugin to quickly send a 404 for missing static files

Static 404 A WordPress plugin to quickly send a 404 for missing static files. Quickly output a 404 for static files that aren't found, rather than loa

Container Open Inventory ID send bug fix PocketMine-MP plugin

ContainerOpenFixed Container Open Inventory ID send bug fix PocketMine-MP plugin Example use skh6075\containeropenfixed\IWindowType; use pocketmine\ne

Formcreator is a plugin which allow creation of custom forms of easy access
Formcreator is a plugin which allow creation of custom forms of easy access

Formcreator is a plugin which allow creation of custom forms of easy access. At the same time, the plugin allow the creation of one or more tickets when the form is filled.

CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file

CrateKeyShopGUI CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file Depend FormAPI EconomyAPI PiggyCrate InvCrashFix Download Dow

Comments
  • Entry with empty duration fails

    Entry with empty duration fails

    I try to use Kamai in a "toggl" like way - start an entry, and when completed.

    I am getting the following error Changes could not be saved: No result was found for query although at least one row was expected.

    I have noticed that this happens only for projects that have GitLab project id assigned. The error occurs with Gitlab issue ID set to existing issue, default 0, and none.

    opened by pluskal 4
  • GitLab issueId=0 throws an Error

    GitLab issueId=0 throws an Error

    This error occurs only if an issueId has been set already and it is replaced with 0.

    Changes could not be saved: HTTP/2 404 returned for "https://example.url.com/api/v4/projects/5/issues/0/add_spent_time?duration=16m".

    grafik

    opened by Sim0nW0lf 0
  • Fix duration and issueId error

    Fix duration and issueId error

    #2

    1. Duration: Sending $totalDuration < 1 to GitLab will result in an error. Just returning instead will prevent that and start time recording.
    2. IssueId Error: getSingleScalarResult throws an error when there is no IssueId set by the user. This needs to be catched in order to start time recording anyways.
    opened by Sim0nW0lf 0
  • GitLab token per user

    GitLab token per user

    Using this plugin, I have noticed that the GitLab token is shared for all users. This way, GitLab accounts the time to the user owning the token instead of the actual user that tracked the time.

    Would it not be possible to extend configuration to allow each user to add their token?

    opened by pluskal 0
Owner
LibreCode coop
Worker-owned cooperative. API, Web and Cloud experts. Creators of @LibreSign.
LibreCode coop
Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

MantisBT Community Plugins 175 Sep 3, 2022
This plugin allows you to display code from a repository, such as Github, Gitlab or others in order to use it as a resource in the courses.

Fetch Code This plugin allows you to display code from a repository, such as Github, Gitlab or others in order to use it as a resource in the courses.

Cambá Laboratorio de Tecnología 0 Dec 26, 2021
Plugin to diagnose/fix ClassicPress SSL issues.

ClassicPress SSL Fix This plugin provides a way to work around the issue "cURL error 60: SSL certificate problem: certificate has expired" in ClassicP

ClassicPress Research 2 Oct 10, 2021
A PHP implementation of the Unleash protocol aka Feature Flags in GitLab.

A PHP implementation of the Unleash protocol aka Feature Flags in GitLab. This implementation conforms to the official Unleash standards and implement

Dominik Chrástecký 2 Aug 18, 2021
Gitlab Composer repository

Gitlab Composer repository Small script that loops through all branches and tags of all projects in a Gitlab installation and if it contains a compose

WeMakeCustom -- DEFUNCT 165 Oct 17, 2022
PSpec is a testing framework for PHP, influenced by RSpec and jest. 🧪 This repo is a MIRROR of the GitLab source repository.

PSpec PSpec is a testing framework for PHP, influenced by RSpec and jest. This project is experimental and still needs a lot of work. Example // src/C

CodingPaws 0 Mar 31, 2022
Issue tracking application extending GitHub's issues and pull requests for the Joomla! project.

Requirements The issue tracker application requires a server running: PHP 7.2 or 7.3 PHP's ext/curl and ext/intl should also be installed MySQL 5.5.3

Joomla! 68 Oct 27, 2022
A tool to automatically fix Twig Coding Standards issues

Twig CS Fixer Installation This standard can be installed with the Composer dependency manager. Add the coding standard as a dependency of your projec

Vincent Langlet 50 Jan 6, 2023
Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.

PhpDeprecationDetector PhpDeprecationDetector - analyzer of PHP code to search usages of deprecated functionality in newer interpreter versions - depr

Sergey 312 Dec 26, 2022