kevinpapst / kimai2-console

Console application for Kimai remote access - time-tracking via bash
https://www.kimai.org/store/console-phar.html
MIT License
11 stars 1 forks source link

kimai start error 400 when activity got slash char #9

Open sotornien opened 3 years ago

sotornien commented 3 years ago

Hi,

my commands look like these:

kimai start --customer 'Customer-X' --project 'Project X' --activity 'Training/Study' --description 'Any description' --tags ''

Please note the different String Parameter:

However this is working:

kimai start --customer 'Customer-X' --project 'Project X' --activity '10' --description 'Any description' --tags ''

I switched from activity 'Training/Study' to '10', the ID of this activity -> This is working. Other activity string-parameter like 'Meeting' or 'Docs' is also working

Kimai Version: Kimai 2 - 1.7 stable (Ayumi) by Kevin Papst and contributors. Kimai 2 - Remote Console version 0.3.3 2020-01-27 17:22:30 UTC (#5546282)

OS: DISTRIB_ID=ManjaroLinux DISTRIB_RELEASE=20.0.3 DISTRIB_CODENAME=Lysia DISTRIB_DESCRIPTION="Manjaro Linux"

kevinpapst commented 3 years ago

But your screenshot says that the "term" parameter has the backslash. Nevertherless: does it work when you use the select list (using kimai start only) instead of submitting the params?

sotornien commented 3 years ago

Hi Kevin, wow quick response :) Sorry for the misunderstanding, it is about a normal forward slash (I've corrected it in my post) If I'm just using kimai start with the interactive menu it is working.

kevinpapst commented 3 years ago

Internally the Kimai binary AFAIR (its too long ago that I touched this project ) loads a list of activities and compares the given name against the list and then uses the found ID for the actual "start" call. So maybe it is the bash escaping that is a problem?

And again:

But your screenshot says that the "term" parameter has the backslash.

Having a problem in the search term is different from the activity. Maybe I am wrong with my initial assumption that the activity name is used to find the activity ID, but the screenshot is unfortunately missing the important $ kimai start line.

sotornien commented 3 years ago

Hi Kevin, Maybe this screenshot explains it better? kimai