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

kimai start error 400 when activity got slash char #9

Open
sotornien opened this issue Jul 28, 2020 · 4 comments
Open

kimai start error 400 when activity got slash char #9

sotornien opened this issue Jul 28, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@sotornien
Copy link

sotornien commented Jul 28, 2020

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:

  • customer uses a dash, which is working
  • project uses a space, which is also working
  • activity uses a slash which results in a error 400 - Bad request
    kimai2

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 kevinpapst added the bug Something isn't working label Jul 28, 2020
@sotornien sotornien changed the title kimai start error 400 when activity got backslash char kimai start error 400 when activity got slash char Jul 28, 2020
@kevinpapst
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

Hi Kevin,
Maybe this screenshot explains it better?
kimai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants