Is there a way to get the total time spend on all issues that a user have spend with the time tracking /spend
slash command?
Time tracking stats with the API gets just a small amount of data: https://docs.gitlab.com/ce/api/issues.html#get-time-tracking-stats
Gitlab CE 9.1.4
You can remove time by entering a negative amount: /spend -3d will remove 3 days from the total time spent. You can't go below 0 minutes of time spent, so GitLab will automatically reset the time spent if you remove a larger amount of time compared to the time that was entered already.
Issue weight is an estimate of how much time is required to complete the tasks in the issue. Time. Weight. <4 hours.
As I see it is possible to parse comments from API v3 and calculate total.
For example,
https://gitlab.com/api/v3/projects/:id/issues/:issue_id/notes?private_token=your_token
{
id: 73113225,
body: "added 1h of time spent at 2018-05-15",
attachment: null,
author: {
...
username: "mnvxxx",
},
...
}
More info: https://docs.gitlab.com/ee/api/notes.html
UPDATE
Currently I has created instrument for calculating spent time by every contributor. I hope it will be helpful:
https://github.com/zubroide/gitpab
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With