Tracking your time

The time entry form, which is used to add time entries to Redmine, can be accessed from several places. For example, users can open this form by clicking on the Log time link, which can be found in the top-right contextual menu of the issue page. This page is shown in the following screenshot:

Tracking your time

Similar Log time links can be found on the project overview page (on the sidebar) and on the time report page, which will be reviewed later in this chapter.

Note

To be able to log time, the user must have the Log spent time permission.

The time entry form can also be opened by selecting the Log time item in the drop-down menu that can be invoked by right-clicking on an issue in the issue list. Here is a screenshot of this menu:

Tracking your time

But note that the Log time item does not appear in this menu if you selected more than one issue.

Also, this form is partially available within the issue edit form, which can be opened by clicking on the Update link on the issue page. It looks like this:

Tracking your time

Note the Log time block, which is available only if the Time tracking module is enabled for the project.

Tip

The Bulk Time Entry plugin

You can install the Bulk Time Entry plugin, which was originally authored by Eric Davis, to make it possible to add several time entries at a time. This plugin adds the Bulk time entries item to the top-left menu that is shown on every page. Check it out at:

https://github.com/Warecorp/redmine-bulk_time_entry_plugin

The complete time entry form can be invoked using the Log time link on the system time report, which can be opened using the Overall spent time link on the Projects page. It looks like this:

Tracking your time

As you can see, the Project and Issue fields are optional. That is, you can add time entries that are not associated with an issue and even a project. This can be useful if, for example, you need to track time that was spent on company meetings.

The Date field of this form should be set to the date when you spent the time. By default, this field is set to today's date.

The Hours field should contain the number of hours that you spent. The value of this field can be a decimal or a time in a human-readable format, for example, 30m, 30min, 1h30, 1h30m or 1:30.

Tip

If you decide to specify a decimal value in the Hours field, please note that it should contain decimals after the point, not minutes, that is, .00 to .99 and not .00 to .59. Thus, to specify 1:30 (one hour and thirty minutes) you should enter 1.50 in this field.

While the Comment field is optional, it's recommended you use this field to briefly describe what exactly you have been doing. Generally, this comment is for your managers, so if they do not need such details, you can leave it empty.

Tip

Avoid using general comments such as, Worked or Tested. Good examples are Investigated, why did the issue come up, Implemented GetSomething() function, and Was writing the Time Tracking section.

The Activity field of this form should be set to the type of work that you were doing. If you were doing various jobs, you should create separate time entries for each type.

Tip

The Time Tracker plugin

The Time Tracker plugin, which was originally authored by Jérémie Delaitre, can simplify the process of logging time by adding Start and Stop links to the account menu (which is located in the top-right corner). Check it out at https://github.com/hicknhack-software/redmine_time_tracker.

Once you have filled in the form, you can click on either the Create button to be redirected to the page from which you came to this form, or the Create and continue button to get this form again and add another time entry.

Tip

Tracking time from a mobile device

To track time from an iPhone or Android device, you can use RedminePM, which can be found at http://redminepm.com. This is a full-featured Redmine client that supports time logging in addition to many other functions.

Tracking time through commit messages

When we were reviewing the Repositories tab of the Settings page, which can be found in the Administration menu (we did it twice, in Chapter 3, Configuring Redmine, and Chapter 4, Issue Tracking), we skipped the part of the form that is shown in the following screenshot:

Tracking time through commit messages

In this form, we skipped the Enable time logging and Activity for logged time settings as you knew nothing about time logging at that time. So let's now see what we can do with these settings.

If the Enable time logging setting is enabled, users will be able to add time entries through SCM commit messages. Thus, suppose a user commits changes to a repository using this command:

$ svn commit -m 'Finished controller, refs #1554 @4:30'

This will tell Redmine to add a time entry for issue #1554 with the Hours attribute set to 4 hours and 30 minutes. This time entry will use the activity that has been selected in the Activity for logged time setting. Its comment will be Applied in changeset R, where R is the revision ID. The date on which the commit has been made will be used for the Date attribute of the added time entry.

So, to add a time entry through an SCM, a user should make sure that the commit message contains a string that follows this format:

refs #N @HM

Let's discuss what it means:

  • refs: This is any of the keywords that are specified in the Referencing keywords setting (however, it's not needed if Referencing keywords are set to *).
  • #N: This is an issue number, for example, #1554.
  • @HM: This specifies the time that was spent. HM can be in a variety of formats, for example, 1h30m, 5hours, 1hour5min, 20min, 1:30, 1.5h, 2, or 8h (all without spaces).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset