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

Allow to create time records with specified time and duration #7

Open
cmhe opened this issue Feb 6, 2020 · 2 comments
Open

Allow to create time records with specified time and duration #7

cmhe opened this issue Feb 6, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@cmhe
Copy link

cmhe commented Feb 6, 2020

kimai2-console could be a useful tool to create time records via scripts from the shell in bulk. That would be useful for instance to import longer vacation, sick-leave periods or national holidays. (In case kimai2 is used to track attendance and working hours.)

To do that, the kimai2-console would need an option to specify the date and duration of those entries when creating them.

@kevinpapst kevinpapst added the enhancement New feature or request label Feb 6, 2020
@drustan
Copy link

drustan commented Apr 16, 2024

This would be a real plus. So far, since it impossible to specify a custom starting date and hour, to add a past event, I create the timesheet first with kimai start -d "what I did", immediately stop it with kimai stop and then use the Web UI to adjust the date and start/stop time. Not very handy 😅

@kevinpapst
Copy link
Owner

Then add an option here:
https://github.com/kevinpapst/kimai2-console/blob/master/src/Command/StartCommand.php#L33

And some lines deeper you pass in these values to the form.
Methods can be found here:
https://github.com/kimai/api-php/blob/main/lib/Model/TimesheetEditForm.php#L290
https://github.com/kimai/api-php/blob/main/lib/Model/TimesheetEditForm.php#L314

Once it works, you create a PR so everyone benefits 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants