v4 API time_stats returns 0 for all issues
Summary
When calling GET /projects/:id/issues/:issue_iid/time_stats
with the v4 API for any issue, it always returns zero/null values.
Yet the issue has time set as shown in the GUI
{
"time_estimate": 0,
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
We have an invoicing application that has worked for quite some time, this bug seems like a regression in 9.3.6 -> 9.3.8 (I upgraded to see if it was fixed)
All other API calls seem to behave as expected
Steps to reproduce
Check time on an issue in the GUI, then call the API endpoint for the JSON results of the same issue
I can't reproduce this on gitlab.com
What is the current bug behavior?
Time returned via the API is zero/null
What is the expected correct behavior?
I would expect to see the correct time returned in the API as per the GUI.
Results of GitLab environment info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Redis Version: 3.2.5
Git Version: 2.13.0
Sidekiq Version:5.0.0
Go Version: unknown
GitLab information
Version: 9.3.8
Revision: 63d383e
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 5.1.1
Repository storage paths:
- default: /git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git