Time tracking: first iteration
Description
We want to introduce time tracking in GitLab. This has already been defined in length in #921 (closed). In order to ship the first iteration and gather feedback quickly, we need to scale down the feature to its most minimal form and ship it.
Proposal
General concepts
- Time tracking comes with two concepts: estimates, and time spent.
- Time tracking is entered via slash commands.
- We don't have any configuration whatsoever.
- We don't have reporting for now.
- We don't read time tracking data from commit messages.
New slash commands
We will create a bunch of new slash commands:
-
/estimate 1w 3j 2h 14m
: add an estimate for the task -
/spend 3w
: indicate how much time the task took -
/spend -3d
: ability to remove time.
Time format follows Jira convention with the sames rules as they have:
- Default conversion rates are 1w = 5d and 1d = 8h.
- If we enter a number without anything else (like 2), we will assume it’s hours.
- If we enter 40h, we will automatically convert this to 5d.
- We allow the following time units:
- weeks (
w
) - days (
d
) - hours (
h
) - minutes (
m
)
- weeks (
Rules about those slash commands
-
/estimate
can be entered in the body of the issue/MR or in a comment. Only the latest/estimate
is taken into account, and overrides any other estimates. -
/spend
can be entered in the body or in a comment too. Contrary to/estimate
, we will count the total of each occurrence to calculate the spent time on a task. The total count is calculated every time a/spend
command is entered. -
/spend
can only be defined by project members, in order to prevent having false positive. - Issues/MR can have an estimate only, a time spent only or both.
System notes when adding an estimate or time spent
When we write a slash command, a system message appears at the bottom of the issue/MR
- In the case of an estimate,
Changed estimate of this issue to 1w 3d 14h
- Time spent:
Added 3h of time spent on this issue
Changes in the sidebar of an issue/MR
- We will display both the Estimate and the Time spent totals in the sidebar.
- This is just informative. This information is not editable but represents the summary of every time mention in the issue/MR.
- The information in the sidebar is written in a human format:
1w 1d 12h
instead of435h
.
Measures/KPI
We have to be able to answer
- how many issues activate time tracking (either through estimates or time spent)
- how many MRs activate time tracking (either through estimates or time spent)
Design needed
- We need a design on how we will represent the information in the sidebar
Mockups
When neither estimated or spent has been updated. Help icon expands help section. Learn more links to documentation of time tracking. Question mark icon transforms into close icon to toggle the help section.
When only the estimated time has been entered:
When only the time spent has been entered:
When both time spent and estimated times have been entered, a bar graph is displayed. Hovering over remaining time will show remaining time in tool tip.
When time spent is greater that estimated time, the time is displayed in red.
Out of scope for this iteration
- Reporting
- Export of data
- Billable hours
- Configuration
Links / references
- Meta issue for time tracking: #921 (closed)
cc @JobV @sytses @ChadMalchow for review. cc @DouweM and @jschatz1 for the weight.