1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
|
---
stage: Plan
group: Project Management
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Time tracking
DETAILS:
**Tier:** Free, Premium, Ultimate
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
> - Time tracking for tasks [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/438577) in GitLab 17.0.
> - Time tracking for epics [introduced](https://gitlab.com/groups/gitlab-org/-/epics/12396) in GitLab 17.5. Your administrator must have [enabled the new look for epics](../group/epics/epic_work_items.md).
You can estimate and track the time you spend on an item, such as:
- [Epic](../group/epics/index.md). Your administrator must have [enabled the new look for epics](../group/epics/epic_work_items.md).
- [Issue](issues/index.md).
- [Task](../tasks.md).
- [Merge request](merge_requests/index.md).
Then you can [view a report](#view-an-items-time-tracking-report) that shows totals over time.
Use time tracking for these tasks:
- Record the time spent working on an item.
- Add or update an estimate of the total time to complete an item.
- View a breakdown of time spent working on an item.
You don't have to indicate an estimate to enter the time spent, and vice versa.
To enter and remove time tracking data, you must use [quick actions](quick_actions.md).
Type all quick actions on their own lines.
If you use any quick action more than once in a single comment, only its last occurrence is applied.
You can see the data about time tracking on the right sidebar:

## Estimates
The estimate is designed to show the total time needed to complete an item.
You can see the estimated time remaining when you hover over the time tracking information in the right sidebar.

### Add an estimate
Prerequisites:
- In issues, you must have at least the Reporter role for the project.
- In tasks, you must have at least the Reporter role for the project.
- In merge requests, you must have at least the Developer role for the project.
To enter an estimate, use the `/estimate` [quick action](quick_actions.md), followed by the time.
For example, if you need to enter an estimate of 1 month, 2 weeks, 3 days, 4 hours, and 5 minutes,
type `/estimate 1mo 2w 3d 4h 5m`.
Check the [time units you can use](#available-time-units).
An item can have only one estimate.
Every time you enter a new time estimate, it overwrites the previous value.
### Remove an estimate
Prerequisites:
- In issues, you must have at least the Reporter role for the project.
- In tasks, you must have at least the Reporter role for the project.
- In merge requests, you must have at least the Developer role for the project.
To remove an estimate entirely, use the `/remove_estimate` [quick action](quick_actions.md).
## Time spent
As you work, you can log the time you've spent.
Every new time spent entry is added to the current total time spent for the
issue, task, or the merge request.
The total amount of time spent on an issue, task, or merge request cannot exceed a year.
### Add time spent
Prerequisites:
- You must have at least the Reporter role for the project.
#### Using the user interface
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101563) in GitLab 15.7.
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150564) in GitLab 17.0. When you don't specify when time was spent, current time is used.
To add a time entry using the user interface:
1. In the **Time tracking** section of the sidebar, select **Add time entry** (**{plus}**). A dialog opens.
1. Enter:
- The amount of time spent.
- Optional. When it was spent. If empty, uses current time.
- Optional. A summary.
1. Select **Save**.
The **Spent** total in the sidebar is updated and you can view all entries in a [time tracking report](#view-an-items-time-tracking-report).
#### Using a quick action
To enter time spent, use the `/spend` [quick action](quick_actions.md), followed by the time.
For example, if you need
to log 1 month, 2 weeks, 3 days, 4 hours, and 5 minutes, type `/spend 1mo 2w 3d 4h 5m`.
Check the [time units you can use](#available-time-units).
To add a [time tracking report](#view-an-items-time-tracking-report) entry with a note, create a comment
with a description and the quick action.
It then shows in the time tracking report **Summary/Notes** column. For example:
```plaintext
Draft MR and respond to initial comments
/spend 30m
```
To log when time was spent, enter a date after the time, using the `YYYY-MM-DD` format.
For example, to log 1 hour of time spent on 31 January 2021,
enter `/spend 1h 2021-01-31`.
If you type a future date, no time is logged.
### Subtract time spent
Prerequisites:
- You must have at least the Reporter role for the project.
To subtract time, enter a negative value. For example, `/spend -3d` removes three
days from the total time spent. You can't go below 0 minutes of time spent,
so if you remove more time than already entered, GitLab ignores the subtraction.
### Delete time spent
> - Delete button [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/356796) in GitLab 15.1.
A timelog is a single entry of time spent, either positive or negative.
Prerequisites:
- You must be the author of the timelog or have at least the Maintainer role for the project.
To delete a timelog, either:
- In the time tracking report, on the right of a timelog entry, select **Delete time spent** (**{remove}**).
- Use the [GraphQL API](../../api/graphql/reference/index.md#mutationtimelogdelete).
### Delete all the time spent
Prerequisites:
- You must have at least the Reporter role for the project.
To delete all the time spent at once, use the `/remove_time_spent` [quick action](quick_actions.md).
## View an item's time tracking report
To view a time tracking report of time spent on an item:
- For an issue or a merge request:
1. Go to an issue or a merge request.
1. In the right sidebar, select **Time tracking report**.
- For an epic or a task:
1. Go to an epic or a task.
1. In the right sidebar, select the time next to **Spent**.

The breakdown of spent time displayed is limited to a maximum of 100 entries.
## Global time tracking report
DETAILS:
**Status**: Experiment
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/344002) in GitLab 15.11 [with a flag](../../administration/feature_flags.md) named `global_time_tracking_report`. Disabled by default.
> - Enabled on GitLab.com in GitLab 16.5.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, an administrator can [enable the feature flag](../../administration/feature_flags.md) named `global_time_tracking_report`.
On GitLab.com, this feature is available. On GitLab Dedicated, this feature is not available.
This feature is not ready for production use.
View a report of time spent in issues, tasks, and merge requests across all of GitLab.
This feature is an [experiment](../../policy/experiment-beta-support.md).
If you find a bug, let us know in the [feedback issue](https://gitlab.com/gitlab-org/gitlab/-/issues/435222).
To view the global time tracking report:
1. In your browser, enter the global report's URL:
- For self-managed, add `/-/timelogs` to your base URL. For example, `https://gitlab.example.com/-/timelogs`.
- For GitLab.com, go to <https://gitlab.com/-/timelogs>.
1. Optional. To filter by a specific user, enter their username without the `@` symbol.
1. Select start and end dates.
1. Select **Run report**.

## Available time units
The following time units are available:
| Time unit | What to type | Conversion rate |
| --------- | --------------------------- | --------------- |
| Month | `mo`, `month`, or `months` | 4 w (160 h) |
| Week | `w`, `week`, or `weeks` | 5 d (40 h) |
| Day | `d`, `day`, or `days` | 8 h |
| Hour | `h`, `hour`, or `hours` | 60 m |
| Minute | `m`, `minute`, or `minutes` | |
### Limit displayed units to hours
DETAILS:
**Tier:** Free, Premium, Ultimate
**Offering:** Self-managed, GitLab Dedicated
In GitLab self-managed instances, you can limit the display of time units to hours.
To do so:
1. On the left sidebar, select **Search or go to**.
1. Select **Settings > Preferences**.
1. Expand **Localization**.
1. Under **Time tracking**, select the **Limit display of time tracking units to hours** checkbox.
1. Select **Save changes**.
With this option enabled, `75h` is displayed instead of `1w 4d 3h`.
## Related topics
- Time tracking GraphQL references:
- [Connection](../../api/graphql/reference/index.md#timelogconnection)
- [Edge](../../api/graphql/reference/index.md#timelogedge)
- [Fields](../../api/graphql/reference/index.md#timelog)
- [Timelogs](../../api/graphql/reference/index.md#querytimelogs)
- [Group timelogs](../../api/graphql/reference/index.md#grouptimelogs)
- [Project Timelogs](../../api/graphql/reference/index.md#projecttimelogs)
- [User Timelogs](../../api/graphql/reference/index.md#usertimelogs)
|