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

mite-cli lists time entries of all users #3

Closed
yolk opened this issue Oct 19, 2018 · 5 comments
Closed

mite-cli lists time entries of all users #3

yolk opened this issue Oct 19, 2018 · 5 comments
Assignees

Comments

@yolk
Copy link
Contributor

yolk commented Oct 19, 2018

mite list always returns all time entries of all users in a multiuser mite account. You should send the parameter user_id set to current with every request to time_entries.json to only return the time entries of the current user. Maybe there could be some way to overwrite this if needed?

@Ephigenia Ephigenia self-assigned this Nov 2, 2018
@Ephigenia
Copy link
Owner

I was thinking about adding "current" as the default value for the "user_id" parameter of mite list.

For the use cases, I could think of, it seems to be okay that the user_id option is not used by default and also doesn’t have a default value.

When the API key belongs to an admin or owner of the account you’ll always see all user’s time entries unless you specify the user_id option and set it to "current" or a CSV list of user ids: mite list --user_id=current which returns only your entries or mite list --user_id=83718,12737 which returns entries of a these users.

When your API key belongs to a time-tracking account you will only get your time entries.

What do you think?

@yolk
Copy link
Contributor Author

yolk commented Nov 5, 2018

Thanks for your reply. I guess it boils down to the use cases you have in mind.

If you regard the mite list output as something like the reports section in mite your option seems valid. But if you look at it more like the daily time entries view, I guess it should default to only the entries of the current user, regardless of the role of the current user.

But these are only my two cents ;)

@yolk
Copy link
Contributor Author

yolk commented Nov 5, 2018

Oh, I forgot my best argument :)

At the moment there is no column mentioning the user name when running mite list; so there is no way I could distinguish my entries from the ones made by my colleagues.

@Ephigenia
Copy link
Owner

Ephigenia commented Nov 5, 2018

At the moment there is no column mentioning the user name when running mite list; so there is no way I could distinguish my entries from the ones made by my colleagues.

Yes, you’re right. I’ll add the user column to the reported table then … #4

@Ephigenia
Copy link
Owner

I’m closing this issue now. I guess there are some people who would like to have mite list show only their entries but also some who which to see them all. As there‘s no clean way to set a default and be able to unset it on demand I think the people who wish to see only their entries can create an alias which always calls mite list --user_id=current.

As far as there are no other users mentioning this I’ll keep it like it is.

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

No branches or pull requests

2 participants