clockify-cli
clockify-cli copied to clipboard
Add ability to limit which client is searched for projects
We may be using this a little oddly, but each of our clients all have projects with the same title for various reasons.
It would be great if there was a way to specify which client right away when adding a new entry.
For example:
clockify-cli in 'Support' -d 'Foo support'
Forces me to still select from the numerous different clients that have a Support
project
I would like to be able to do something like:
clockify-cli in 'Support' -c 'Client1' -d 'Foo support'
And have the interactive prompt be on the appropriate client's Support
project.
Or in the case of wanting to select the project interactively:
clockify-cli in -c 'Client1' -d 'Foo'
Would only show projects from client Client1
hi @tykeal , your reports must be difficult do read.
i will take a look into filtering the client of the project
Not so much. Our use case is a team of engineers doing long term support of several major projects (which we're designating as clients to Clockify) each of those projects has essentially 4 buckets of work (aka projects). Support, Internal Meetings, Customer Meetings, Vendor Meetings. We're using the description field to clarify what is being worked on and tags to specify generic classes of work.
All of our clients projects are billed time. Corporate projects which are different are all unbilled. We're doing this because of how the budgeting around all of this works for us.
In any case, thank you for looking into it!
hi @tykeal can you try the version v0.47.0 to see if it helps?
@lucassabreu I've tried this out and while I see the option, it doesn't seem to be doing anything for me:
Here's a screen shot of what happened when I tried this.
I also tried it alone, and with the client ID and in no case did it jump to what I was expecting. I was expecting that with something like that it would have done two things:
- Jump to the expected project
- Filtered out the other clients that didn't match
Please note, I was playing with the webUI and when selecting a project from an entry picker I can filtered down the visible projects in the type down and the clients all at the same time. For instance the following expression would have filtered it to just the project in question: intern pytorch
in the project picker. While I don't expect the cli to work 100% the same, it would be nice to get it closer ;)
hi @tykeal , i thought you wanted for the "non interactive mode", because the project search input already does look into the project and client names.
(ascinema)
i guess it could also translate into the pre-selection for the interactive mode too.
thats something to look into later
Yes, I was hoping for the pre-selection. I suppose I wasn't as clear in my request. I've got interactive setup as the default mode since I've been needing to go through selection given how things are working. I didn't even try this feature on a non-interactive mode.
Given my watching your little animation there, maybe having the project / client information just fill in the initial search string on the interactive would be good since it's doing the "correct" thing if you type it. If it had been doing that initially I likely wouldn't have even opened this request ;)
A side note, I did just try it non-interactively and it didn't work for me. It still ended up starting the timer against the first hit of the project and not the the one that the client would have pinned it on.
hi @tykeal , about auto-filling the search is not something the lib i use allows, so i can't/wont't do that.
also it does make more sense to me for the user to not set flags when using interactive mode, since they will be asked the info anyway (just doing clk in -i
without other flags).
but the comment about the -p
to look into the client's name i think its the right behavior, so it matches the way the filter on the interactive mode works and the user does not have the expectations broken with the -p
.
this change is at the v0.48.1 version, but since is a breaking change on the -p
behavior you need to set the config search-project-with-client
to true
for it to work.
clockify-cli config set search-project-with-client true
could you try again? both using just -p
and with -c
?
// search on project and client's name
clockify-cli in -p "meet pytorch"
// set project client to lookup
clockify-cli in -p "meet" -c "pytorch"
This works great! :) Thank you!
After setting search-project-with-client
to true
clockify-cli in 'intern pyt'
Does the correct thing. As an FYI if I try that with -c
it doesn't work unless I explicitly pass -p
I think that may be why my earlier test wasn't specifically working for me. I haven't been passing -p
since that seems to be the default action (which I like!)