Project

General

Profile

RedmineTimeTracking » History » Version 18

Mikkel Kirkgaard Nielsen, 2017-10-27 12:09
elaborate and clean explanation of spent time via commit, refer to relevant docs

1 1 Jean-Philippe Lang
h1. Time tracking
2
3 9 Mischa The Evil
{{>toc}}
4 5 James Rowe
5
h2. Introduction
6
7 16 Mikkel Kirkgaard Nielsen
Time tracking allows users to track how many hours of work are logged to a specific issue or project. Each time entry of "spent time" can be categorized by activity, and further explained with comments. By filling time estimates, project managers are able to produce better suited project planning as well as follow individual user's progress. 
8 6 James Rowe
9 16 Mikkel Kirkgaard Nielsen
Time tracking is always related to a user, thus it can be used to track how many billable hours this user has accomplished. See the [[RedmineTimelogDetails|spent time details]] or [[RedmineTimelogReport|spent time report]] pages for more information.
10 5 James Rowe
11
h2. Installing/Configuration
12
13 9 Mischa The Evil
Time tracking is a standard module of Redmine and can be enabled/disabled for each project in the *Modules* section of the new project form, or the *Settings* tab of an existing project.
14 1 Jean-Philippe Lang
15 2 Jean-Philippe Lang
h2. Logging time on an issue
16
17
You can log time on an issue by clicking !/images/time_add.png! *Log time* from the issue details view.
18 1 Jean-Philippe Lang
19 9 Mischa The Evil
p=. !log_time.png!
20 1 Jean-Philippe Lang
21
You can also log time when updating an issue.
22
23 9 Mischa The Evil
p=. !Update_LogTime.png!
24 1 Jean-Philippe Lang
25
h2. Logging time at project level
26
27
You can log hours at project level by leaving the issue field empty.
28 9 Mischa The Evil
29
h2. Accepted time formats
30
31 16 Mikkel Kirkgaard Nielsen
Estimated and spent time can be entered using either separated hour and minutes or combined in the following formats:
32
# Separated: hour and minutes as an integer using standard time format: *@1h@*, *@1 h@*, *@1 hour@*, *@2 hours@*, *@30m@*, *@30min@*, *@1h30@*, *@1h30m@*, *@1:30@*
33
# Combined: as a fraction of hours in decimal time format using either period (.) or comma (,) as decimal separator: *@1.5@*, *@1,5@* (equals to @1h30@)
34 1 Jean-Philippe Lang
35
h3. Decimal time format
36 9 Mischa The Evil
37 16 Mikkel Kirkgaard Nielsen
When entering estimated or spent time values in Redmine using "decimal time format":http://en.wikipedia.org/wiki/Decimal_time you have to be aware that Redmine will also show accumulated time values in decimal time format.
38 9 Mischa The Evil
39 16 Mikkel Kirkgaard Nielsen
Consider the following example:
40 1 Jean-Philippe Lang
41 16 Mikkel Kirkgaard Nielsen
* in a project you have 4 issues with the following spent time values: *1.00*, *0.10*, *0.15*  & *0.40*. Now in the Spent Time reports (Project overview -> Spent time -> [Details | Report]) you will see the accumulated total of the decimal values of 1.65 hours (1 hour 39 minutes), not a separate accumulation of the hour and minutes after the decimal point (which would yield an incorrect value of 2.05 hours).
42
43
* _Explanation_: this is intended behaviour since the four spent time values are entered in decimal time format. The values are interpreted as follows: 
44 9 Mischa The Evil
** 1.00 decimal equals 60 minutes (1 hour)
45
** 0.10 decimal equals 6 minutes
46
** 0.15 decimal equals 9 minutes
47
** 0.40 decimal equals 24 minutes
48
** 1.65 decimal equals 99 minutes
49 16 Mikkel Kirkgaard Nielsen
** 2:05 hours (125 minutes) equals 2.0833333333333335 (est.) in decimal notation
50 9 Mischa The Evil
51 16 Mikkel Kirkgaard Nielsen
Due to rounding of the decimal values to two decimals done when showing an accumulated value there can possibly be a tiny difference (as can be seen from the 2:05 example above).
52 9 Mischa The Evil
53
Some references:
54
* http://en.wikipedia.org/wiki/Decimal_time
55
* http://www.springfrog.com/converter/decimal-time.htm
56 11 Jean-Philippe Lang
57
h2. Logging time via commit messages
58
59 18 Mikkel Kirkgaard Nielsen
A handy feature for developers committing to SCM systems integrated with a Redmine instance is that they can register "spent time" against an issue via their commit messages when referencing an issue.
60 11 Jean-Philippe Lang
61 18 Mikkel Kirkgaard Nielsen
For this to work the *Enable time logging* option must be activated under _Application settings -> Repositories_ (refer to [[RedmineSettings#Enable-time-logging|documentation]]). Also the activity under which spent time is logged must be explicitly choosen in the *Activity for logged time* option under _Application settings -> Repositories_ (refer to [[RedmineSettings#Activity-for-logged-time|documentation]]) (the default activity 'Default' doesn't work).
62 11 Jean-Philippe Lang
63 18 Mikkel Kirkgaard Nielsen
The time specification in the commit message can be any of the above [[RedmineTimeTracking#Accepted-time-formats|accepted time formats]] but must be preceded with a valid issue reference as configured under "Referencing and fixing issues in commit messages" in _Application settings -> Repositories_ ([[RedmineSettings#Referencing-issues-in-commit-messages|refer to documentation]]).
64 1 Jean-Philippe Lang
65 18 Mikkel Kirkgaard Nielsen
An example using the default issue referencing keyword "refs":
66 14 Mohit Sindhwani
67 18 Mikkel Kirkgaard Nielsen
  Fixed something, refs #435 @1h30
68
69
This commit message will add 1 hour and 30 minutes of spent time on issue !#435.