Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added hourly and money budgets to activity, project and customer #843

Merged
merged 41 commits into from Jun 11, 2019

Conversation

kevinpapst
Copy link
Member

@kevinpapst kevinpapst commented Jun 5, 2019

Description

Can be tested at https://demo-branch.kimai.org/
Login as admin, go to Customer/Projects/Activities and select "Reports" from the drop-down
You may find, that there is only one or no progress bar shown, in this case you found an entity that has no budget defined. The test data is generated randomly, so you need to configure your test data manually!

Bildschirmfoto 2019-06-10 um 08 13 12

Both money and duration budgets are not validated in any way, so you could add a budget of 100 € to your customer and 1000 € on a project for that customer. You could also set the time budget to 0 while having a budget of 10000€.

The budgets are not used for validation when creating / stopping time entries, for now they are an optional feature and exceeding a budget has no consequences (see screenshot, there is more time logged on the customer than the budget "allows").
These fields exist for statistical purpose only (for now).

Changes

  • added budget and timeBudget column to customers
  • added timeBudget column to projects (budget column was already existing) (Fixes maximale Anzahl Projektstunden als Vorgabe #467)
  • added budget and timeBudget column to activities
  • added permissions, so only permitted users can edit the values and see the report:
    • budget_activity - view and edit budgets for activities
    • budget_project - view and edit budgets for projects
    • budget_customer - view and edit budgets for customers
  • importing budgets from projects and activities from Kimai v1 (Fixes import project "budget" field #841)
  • added documentation (see added time budget docs www.kimai.org#28)
  • added budget reporting view to customer, project and activity

Fixes #416

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I verified that my code applies to the guidelines (composer code-check)
  • I updated the documentation (see here)
  • I agree that this code is used in Kimai and will be published under the MIT license

@kevinpapst kevinpapst changed the title adding budgets added hourly and money budgets to activity, project and customer Jun 10, 2019
@codecov
Copy link

codecov bot commented Jun 10, 2019

Codecov Report

Merging #843 into master will increase coverage by 0.32%.
The diff coverage is 98.61%.

@@             Coverage Diff              @@
##             master     #843      +/-   ##
============================================
+ Coverage     93.68%   94.01%   +0.32%     
- Complexity     2332     2340       +8     
============================================
  Files           239      243       +4     
  Lines          7345     7346       +1     
============================================
+ Hits           6881     6906      +25     
+ Misses          464      440      -24
Impacted Files Coverage Δ Complexity Δ
src/Model/ProjectStatistic.php 100% <ø> (ø) 2 <0> (-6) ⬇️
src/Twig/Extensions.php 100% <ø> (ø) 21 <0> (ø) ⬇️
src/Model/CustomerStatistic.php 100% <ø> (ø) 4 <0> (-6) ⬇️
src/Voter/CustomerVoter.php 90.9% <ø> (ø) 5 <0> (ø) ⬇️
src/Voter/ActivityVoter.php 90.9% <ø> (ø) 5 <0> (ø) ⬇️
src/Voter/ProjectVoter.php 90.9% <ø> (ø) 5 <0> (ø) ⬇️
src/Entity/Activity.php 100% <ø> (ø) 18 <0> (ø) ⬇️
src/Entity/Project.php 100% <ø> (ø) 20 <0> (-2) ⬇️
src/Entity/Customer.php 100% <ø> (ø) 58 <0> (ø) ⬇️
src/Form/ActivityEditForm.php 100% <100%> (ø) 10 <0> (ø) ⬇️
... and 24 more

@kevinpapst kevinpapst marked this pull request as ready for review June 11, 2019 00:02
@lock
Copy link

lock bot commented Aug 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
1 participant