Project

General

Profile

Actions

Feature #4155

closed

Automatic spent time logging from commit messages

Added by Marek Siller over 14 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Time tracking
Target version:
Start date:
2009-11-02
Due date:
% Done:

100%

Estimated time:
Resolution:

Description

We have created a small patch for redmine that enables automatic logging of spent time via commit messages of a versioning system.

Use case

This patch allows users to log the spent time automatically along with commiting their work to the SCM. It works in a similar way like referencing or closing issues via commit messages. For example:

Fixed some issue with menu. 

refs #1234 @2h30m

The user does not have to visit the redmine site just to log the spent time any more.

Features

  • Support for both ways of referencing issues - with keywords (refs, fixes, ...) and with wildcard.
  • Possibility to turn the feature on or off (default is the original behavior of redmine).
  • Support for two time formats: as a floating point number (i. e. 2.5) or as a string (i. e. 2h30m or 2h 30m). Time specification must follow the issue reference (blanks allowed). Examples
    refs #1234 @2.5
    references #1234 @2h30m
    fixes #1234 @2h 30m
    
  • Date of logged spent time - date of commit.
  • Owner of logged spent time - user mapped to the SCM account the commit belongs to.
  • Uses default (or the first found if no default set) activity for spent time logging.
  • Comment for logged spent time includes the revision number.

Patch

Tested with Redmine 0.8.5 and the latest development version (both patches included). Tested SCM include Subversion and git.

Patched files

  • app/models/changeset.rb
  • app/views/settings/_repositories.rhtml
  • config/settings.yml (new configuration option: Enable spent time logging)
  • + language files (two new messages - setting_commit_logtime_enabled and text_commit_logtime) - already translated to German and Czech

Any feedback or question is welcome!

Sincerelly Yours,

Marek Siller
Karlsruhe Technology Consulting


Files

LogTime-v1-redmine-0.8.5.patch (27.8 KB) LogTime-v1-redmine-0.8.5.patch Patch for version 0.8.5 Marek Siller, 2009-11-02 16:45
LogTime-v1-redmine-devel.patch (30.2 KB) LogTime-v1-redmine-devel.patch Patch for trunk version Marek Siller, 2009-11-02 16:45
LogTime-v2-redmine-0.8.x.patch (27.8 KB) LogTime-v2-redmine-0.8.x.patch Patch for version 0.8.x (tested on 0.8.5 and 0.8.6) Marek Siller, 2009-11-04 16:46
LogTime-v2-redmine-devel.patch (30.2 KB) LogTime-v2-redmine-devel.patch Patch for trunk version Marek Siller, 2009-11-04 16:46
LogTime-v2.1-redmine-0.8.x.patch (27.8 KB) LogTime-v2.1-redmine-0.8.x.patch Patch for version 0.8.x (tested on 0.8.5 and 0.8.6) - corrected version Marek Siller, 2009-11-06 18:09
LogTime-v2.1-redmine-devel.patch (30.2 KB) LogTime-v2.1-redmine-devel.patch Patch for trunk version - corrected version Marek Siller, 2009-11-06 18:09
LogTime-v2.1-redmine-devel.patch (30.2 KB) LogTime-v2.1-redmine-devel.patch Patch for trunk version - corrected version Marek Siller, 2009-11-06 18:45
logtime_redmine_0.9.2.patch (22.3 KB) logtime_redmine_0.9.2.patch Vladimir Kovacik, 2010-02-18 14:00
logtime_redmine_0.9.2_v2.2.patch (22.3 KB) logtime_redmine_0.9.2_v2.2.patch Vladimir Kovacik, 2010-03-04 10:13
logtime_redmine_0.9.2_v2.3.patch (22.7 KB) logtime_redmine_0.9.2_v2.3.patch Katy A, 2010-05-25 01:45
logtime_redmine_0.9.3_v2.3.patch (22.2 KB) logtime_redmine_0.9.3_v2.3.patch Paul Widden, 2010-09-01 19:33
logtime_redmine_1.0.3-v3.patch (114 KB) logtime_redmine_1.0.3-v3.patch Marek Siller, 2010-11-09 20:13
fix-scmid-all-number.diff (1.8 KB) fix-scmid-all-number.diff Toshi MARUYAMA, 2010-12-11 14:51

Related issues

Related to Redmine - Feature #1518: Log time via commit messagesClosedMischa The Evil2008-06-23

Actions
Related to Redmine - Defect #7630: Spent time in commits not recognizedClosed2011-02-15

Actions
Actions

Also available in: Atom PDF