2016-12-23 00:44:02 -05:00
|
|
|
# Time Tracking
|
|
|
|
|
|
|
|
> Introduced in GitLab 8.14.
|
|
|
|
|
2017-01-03 13:18:02 -05:00
|
|
|
Time Tracking allows you to track estimates and time spent on issues and merge
|
|
|
|
requests within GitLab.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
Time Tracking lets you:
|
2018-11-13 01:07:16 -05:00
|
|
|
|
|
|
|
- Record the time spent working on an issue or a merge request.
|
|
|
|
- Add an estimate of the amount of time needed to complete an issue or a merge
|
2019-02-22 08:17:10 -05:00
|
|
|
request.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
|
|
|
You don't have to indicate an estimate to enter the time spent, and vice versa.
|
|
|
|
|
|
|
|
Data about time tracking is shown on the issue/merge request sidebar, as shown
|
|
|
|
below.
|
|
|
|
|
|
|
|
![Time tracking in the sidebar](time-tracking/time-tracking-sidebar.png)
|
|
|
|
|
|
|
|
## How to enter data
|
|
|
|
|
2019-07-31 05:16:24 -04:00
|
|
|
Time Tracking uses two [quick actions](../user/project/quick_actions.md)
|
|
|
|
that GitLab introduced with this new feature: `/spend` and `/estimate`.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
2017-05-31 01:50:53 -04:00
|
|
|
Quick actions can be used in the body of an issue or a merge request, but also
|
2016-12-23 00:44:02 -05:00
|
|
|
in a comment in both an issue or a merge request.
|
|
|
|
|
2017-05-31 01:50:53 -04:00
|
|
|
Below is an example of how you can use those new quick actions inside a comment.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
|
|
|
![Time tracking example in a comment](time-tracking/time-tracking-example.png)
|
|
|
|
|
|
|
|
Adding time entries (time spent or estimates) is limited to project members.
|
|
|
|
|
|
|
|
### Estimates
|
|
|
|
|
|
|
|
To enter an estimate, write `/estimate`, followed by the time. For example, if
|
|
|
|
you need to enter an estimate of 3 days, 5 hours and 10 minutes, you would write
|
2019-02-12 07:45:20 -05:00
|
|
|
`/estimate 3d 5h 10m`. Time units that we support are listed at the bottom of
|
|
|
|
this help page.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
|
|
|
Every time you enter a new time estimate, any previous time estimates will be
|
|
|
|
overridden by this new value. There should only be one valid estimate in an
|
|
|
|
issue or a merge request.
|
|
|
|
|
2019-02-12 07:45:20 -05:00
|
|
|
To remove an estimation entirely, use `/remove_estimate`.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
|
|
|
### Time spent
|
|
|
|
|
|
|
|
To enter a time spent, use `/spend 3d 5h 10m`.
|
|
|
|
|
|
|
|
Every new time spent entry will be added to the current total time spent for the
|
|
|
|
issue or the merge request.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
To remove all the time spent at once, use `/remove_time_spent`.
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
The following time units are available:
|
2018-11-13 01:07:16 -05:00
|
|
|
|
|
|
|
- months (mo)
|
|
|
|
- weeks (w)
|
|
|
|
- days (d)
|
|
|
|
- hours (h)
|
|
|
|
- minutes (m)
|
2016-12-23 00:44:02 -05:00
|
|
|
|
2018-11-22 03:39:23 -05:00
|
|
|
Default conversion rates are 1mo = 4w, 1w = 5d and 1d = 8h.
|
2016-12-23 00:44:02 -05:00
|
|
|
|
2019-07-31 05:16:24 -04:00
|
|
|
### Limit displayed units to hours **(CORE ONLY)**
|
2019-06-11 06:40:01 -04:00
|
|
|
|
2019-07-31 05:16:24 -04:00
|
|
|
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29469/) in GitLab 12.1.
|
2019-06-11 06:40:01 -04:00
|
|
|
|
2019-07-31 05:16:24 -04:00
|
|
|
In GitLab self-managed instances, the display of time units can be limited to
|
|
|
|
hours through the option in **Admin Area > Settings > Preferences** under **Localization**.
|
2019-06-11 06:40:01 -04:00
|
|
|
|
|
|
|
With this option enabled, `75h` is displayed instead of `1w 4d 3h`.
|
|
|
|
|
|
|
|
## Other interesting links
|
2019-02-12 07:45:20 -05:00
|
|
|
|
2019-04-10 06:32:03 -04:00
|
|
|
- [Time Tracking landing page on about.gitlab.com](https://about.gitlab.com/solutions/time-tracking/)
|