Giter Site home page Giter Site logo

glorpen / kimai-duration-plugin Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 3.0 33 KB

Enables setting duration rounding option (same as global one) to override rounding for any Customer, Project or Activity.

License: GNU General Public License v3.0

PHP 100.00%
kimai-plugin kimai2

kimai-duration-plugin's Introduction

Overridable Duration Rounding for Kimai2

Enables setting duration rounding option (same as global one) to override rounding for any Customer, Project or Activity.

Plugin version Supported Kimai version
1.x 1.x
2.x 2.x

Installation

Checkout plugin into var/plugins/GlorpenDurationBundle & clear cache.

Run bin/console kimai:bundle:glorpen-duration:install.

Usage

After installation, existing Rounding methods will be extended with new functionality. When editing any Customer, Project or Activity you can set Rounding of the duration in minutes option to override global one.

kimai-duration-plugin's People

Contributors

glorpen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

kimai-duration-plugin's Issues

PHP Fatal error: Incompatible Declaration

Hi there, thanks for the plugin! Just wanted to let you know that there is an issue when I try to reload the cache after the plugin has been cloned.

I have created a PR #4 with an untested fix. It would be great if you gave it a glance whenever possible.

PHP Fatal error:  Declaration of KimaiPlugin\GlorpenDurationBundle\Timesheet\Rounding\OverriddenDurationRounding::roundBegin(App\Entity\Timesheet $record, int $minutes): void must be compatible with App\Timesheet\Rounding\RoundingInterface::roundBegin(App\Entity\Timesheet $record, $minutes) in /opt/kimai/var/plugins/GlorpenDurationBundle/Timesheet/Rounding/OverriddenDurationRounding.php on line 72
[2023-05-07 20:41:09] php.CRITICAL: Fatal Compile Error: Declaration of KimaiPlugin\GlorpenDurationBundle\Timesheet\Rounding\OverriddenDurationRounding::roundBegin(App\Entity\Timesheet $record, int $minutes): void must be compatible with App\Timesheet\Rounding\RoundingInterface::roundBegin(App\Entity\Timesheet $record, $minutes) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Compile Error: Declaration of KimaiPlugin\\GlorpenDurationBundle\\Timesheet\\Rounding\\OverriddenDurationRounding::roundBegin(App\\Entity\\Timesheet $record, int $minutes): void must be compatible with App\\Timesheet\\Rounding\\RoundingInterface::roundBegin(App\\Entity\\Timesheet $record, $minutes) at /opt/kimai/var/plugins/GlorpenDurationBundle/Timesheet/Rounding/OverriddenDurationRounding.php:72)"} []

In OverriddenDurationRounding.php line 72:

  [Symfony\Component\ErrorHandler\Error\FatalError]
  Compile Error: Declaration of KimaiPlugin\GlorpenDurationBundle\Timesheet\Rounding\OverriddenDurationRounding::roundBegin(
  App\Entity\Timesheet $record, int $minutes): void must be compatible with App\Timesheet\Rounding\RoundingInterface::roundB
  egin(App\Entity\Timesheet $record, $minutes)


Exception trace:
  at /opt/kimai/var/plugins/GlorpenDurationBundle/Timesheet/Rounding/OverriddenDurationRounding.php:72

PHP Exception / Kimai 2 (1.19.6)

After installing on current Kimai 1.19.6, I've got a problem

[2022-05-05 08:33:03] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\InvalidArgumentException: "The name "glorpen.duration" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":")." at /var/www/clients/clienX/webXXXX/web/vendor/symfony/form/FormConfigBuilder.php line 782 {"exception":"[object] (Symfony\\Component\\Form\\Exception\\InvalidArgumentException(code: 0): The name \"glorpen.duration\" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores (\"_\"), hyphens (\"-\") and colons (\":\"). at /var/www/clients/clientX/webXXXX/web/vendor/symfony/form/FormConfigBuilder.php:782)"} []
[2022-05-05 08:33:03] request.INFO: Matched route "admin_activity_edit". {"route":"admin_activity_edit","route_parameters":{"_route":"admin_activity_edit","_controller":"App\\Controller\\ActivityController::editAction","_locale":"de","id":"1"},"request_uri":"https://xxx/de/admin/activity/1/edit","method":"GET"} []

public const META_FIELD_NAME = 'glorpen.duration';

Solution
changed 'glorpen.duration' to 'glorpen_duration'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.