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

Filter from/to based on spent date #39

Closed
dlichtenegger opened this issue Dec 21, 2017 · 4 comments
Closed

Filter from/to based on spent date #39

dlichtenegger opened this issue Dec 21, 2017 · 4 comments
Labels

Comments

@dlichtenegger
Copy link

dlichtenegger commented Dec 21, 2017

Based on the output report it looks like the filtering is based on the date when the time tracking entry was created, not on the date when it was actually spent.

You can define the spent date directly with the short command:
/spend 1h30m 2017-12-20

This is a problem if you enter your time trackings not on the same day when they were actually spent.

@kriskbx
Copy link
Owner

kriskbx commented Dec 23, 2017

Well, unfortunately you cannot define the date when using the API: https://docs.gitlab.com/ee/api/issues.html#add-spent-time-for-an-issue
You can't execute slash commands via the API either, so as far as I know there's no way of implementing this into gtt right now. I'm sorry. :(

@elboletaire
Copy link

@kriskbx what API call do you exactly use for getting the time tracking stats? This one?

GET /projects/:id/issues/:issue_iid/time_stats

😕

@kriskbx
Copy link
Owner

kriskbx commented Jan 28, 2018

There's no API endpoint for getting individual time records. The time stats endpoint only returns, well, stats... and these stats are not very helpful at all (https://docs.gitlab.com/ee/api/issues.html#get-time-tracking-stats). This is why I made gtt in the first place. Here's how it works: it queries all the issue comments and parses them for spend time. Take a look at the getTime method here to get an idea how it works: https://github.com/kriskbx/gitlab-time-tracker/blob/master/src/models/hasTimes.js#L74

@kriskbx
Copy link
Owner

kriskbx commented May 12, 2018

I implemented filtering by actual dates in the latest release 1.7.5.
Submitting the date of your local time records to GitLab is still not possible.

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

No branches or pull requests

3 participants