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

Support tag creation from query params #930

Merged
merged 12 commits into from
Jul 9, 2019
Merged

Conversation

tobybatch
Copy link
Member

Description

Currently we can specify star and end times in the query params. This adds tag support as a comma separated list.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I verified that my code applies to the guidelines (composer kimai: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

@tobybatch
Copy link
Member Author

Sorry Kevin, I have no idea how to fix this?

  1. App\Tests\Controller\TimesheetTeamControllerTest::testCreateAction
    ArgumentCountError: Too few arguments to function App\Controller\TimesheetAbstractController::create(), 4 passed in /home/travis/build/kevinpapst/kimai2/src/Controller/TimesheetTeamController.php on line 75 and exactly 5 expected

@kevinpapst
Copy link
Member

The AbstractController is extended by two Controllers:
https://github.com/kevinpapst/kimai2/blob/master/src/Controller/TimesheetTeamController.php#L73
you have to adjust that method as well.

Is it necessary to persist the tags before actually creating the record?

@tobybatch
Copy link
Member Author

I thought the record didn't get a id before it was persisted. I'll try without.

Copy link
Member

@kevinpapst kevinpapst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you have a look please at my review comments?

tests/Controller/TimesheetControllerTest.php Outdated Show resolved Hide resolved
tests/Controller/TimesheetControllerTest.php Outdated Show resolved Hide resolved
src/Controller/TimesheetAbstractController.php Outdated Show resolved Hide resolved
src/Controller/TimesheetAbstractController.php Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 9, 2019

Codecov Report

Merging #930 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #930      +/-   ##
============================================
- Coverage     94.14%   94.14%   -0.01%     
+ Complexity     2607     2606       -1     
============================================
  Files           278      278              
  Lines          8100     8096       -4     
============================================
- Hits           7626     7622       -4     
  Misses          474      474
Impacted Files Coverage Δ Complexity Δ
src/Controller/TimesheetController.php 100% <100%> (ø) 5 <1> (ø) ⬇️
src/Controller/TimesheetAbstractController.php 90.78% <100%> (+0.51%) 42 <10> (+3) ⬆️
src/Controller/TimesheetTeamController.php 100% <100%> (ø) 11 <1> (ø) ⬇️

@kevinpapst kevinpapst merged commit b833e1c into kimai:master Jul 9, 2019
@lock
Copy link

lock bot commented Sep 7, 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 Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants