Open cmhe opened 4 years ago
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 :sweat_smile:
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 😄
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.