Edgewall Software

Changes between Version 69 and Version 70 of TimeTracking


Ignore:
Timestamp:
Apr 13, 2015, 8:23:00 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TimeTracking

    v69 v70  
    1 = Time Tracking =
    2 
    3 [[PageOutline(2-4)]]
    4 
    5 Support for basic time tracking is an often request feature, but it does not look like it is going to be integrated into Trac any time soon. Please read #710 for further details. Still there are ways to enhance the ticket system with the desired functionality. This page is meant as an overview of working solutions and as a howto.
     1[[PageOutline(2-5,Contents,pullout)]]
     2
     3= Time Tracking
     4
     5Support for basic time tracking is an oft requested feature (#710), but has not been implemented in Trac core. There are ways to enhance the ticket system with the desired functionality and this page is meant as an overview of working solutions and as a howto.
    66
    77 1. wiki:PluginList#ProjectTimeManagementTicketSystemExtensions recommends to use a combination of several plugins, each one covering a partial functionality of what one needs for time tracking.
     
    1919 Note ^3^:: Patches are unofficial, please do not report bugs through the Trac ticket system. Instead contact the trac user mailing list or [mailto:steffenp@gmx.de Steffen Pingel].
    2020
    21 ----
    22 
    23 == Using a Plugin (Trac >= 0.10) ==
    24 
    25 The '''[http://trac-hacks.org/wiki/TimingAndEstimationPlugin Timing And Estimation Plugin]''' works much the same as the Trac .9.x custom fields approach, except that it should be easier to install and provides a bit more in depth reporting.  It also contains a ticket change daemon that will allow you to add time and have it sum the total up.  The [http://trac-hacks.org/wiki/TimingAndEstimationPlugin project page] contains links to a [https://trac.acceleration.net/TestForTimingAndEstimation demo version] so you can see it in action to decide if it is right for you , as well as bug reporting links.
    26 
    27 The '''[http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin]''' provides a different approach to time tracking (for Trac 0.11 only).  Instead of adding hours via a ticket field, separate views are available for adding and reporting hours.
     21== Using a Plugin (Trac >= 0.10)
     22
     23The '''[http://trac-hacks.org/wiki/TimingAndEstimationPlugin Timing And Estimation Plugin]''' works much the same as the Trac .9.x custom fields approach, except that it should be easier to install and provides a bit more in depth reporting. It also contains a ticket change daemon that will allow you to add time and have it sum the total up. The [http://trac-hacks.org/wiki/TimingAndEstimationPlugin project page] contains links to a [https://trac.acceleration.net/TestForTimingAndEstimation demo version] so you can see it in action to decide if it is right for you, as well as bug reporting links.
     24
     25The '''[http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin]''' provides a different approach to time tracking (for Trac 0.11 only). Instead of adding hours via a ticket field, separate views are available for adding and reporting hours.
    2826
    2927The '''[http://trac-hacks.org/wiki/BudgetingPlugin BudgetingPlugin]''' provides splitting the work-effort for a ticket in several smaller pieces. You can configure tasks (for example implementation, documentation, etc.) and assign users.
    3028
    31 The '''[http://trac-hacks.org/wiki/WorkLogPlugin WorkLog Plugin]''' provides the ability to 'clock in' and 'clock out' and displays which users are currently working on tickets.  If either the [http://trac-hacks.org/wiki/TimingAndEstimationPlugin TimingAndEstimationPlugin] or [http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin] is being used, spent time will be recorded to a ticket when the user 'clocks out'.
    32 
    33 ----
     29The '''[http://trac-hacks.org/wiki/WorkLogPlugin WorkLog Plugin]''' provides the ability to 'clock in' and 'clock out' and displays which users are currently working on tickets. If either the [http://trac-hacks.org/wiki/TimingAndEstimationPlugin TimingAndEstimationPlugin] or [http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin] is being used, spent time will be recorded to a ticket when the user 'clocks out'.
    3430
    3531== Trac 0.9.x, 0.10 (using custom ticket fields) ==
     
    3733A less invasive way than modifying the database as required for Trac 0.8 is to add time tracking through TracTicketsCustomFields. Custom fields are meant as an extension mechanism that allows to store additional data with tickets without changing the underlying data model.
    3834
    39 === Install ===
    40 
    41 This patch requires a few simple steps for installation:
    42 
    43  * Patch Trac to provide a progress bar in the Roadmap view
    44  * Modify trac.ini for each project to add custom fields
    45  * Add a ticket query (optional)
    46  * Use a Subversion commit hook to log spent time (optional)
    47 
    48 ==== Patching Trac ====
     35=== Installation
     36
     37This patch requires a few steps for installation:
     38
     39 * Patch Trac to provide a progress bar in the Roadmap view.
     40 * Modify `trac.ini` for each project to add custom fields.
     41 * Add a ticket query (optional).
     42 * Use a Subversion commit hook to log spent time (optional).
     43
     44==== Patching Trac
    4945
    5046Download and apply the [http://steffenpingel.de/files/patches/trac/ time tracking patch]:
    5147
    5248 * Download and unzip/untar Trac (see TracDownload)
    53 {{{
     49{{{#!sh
    5450wget http://ftp.edgewall.com/pub/trac/trac-0.10.tar.gz
    5551tar -xzvf trac-0.10.tar.gz
     
    5753
    5854 * Run patch from the created trac-0.10 directory:
    59 {{{
     55{{{#!sh
    6056cd trac-0.10
    6157wget http://steffenpingel.de/files/patches/trac/trac-time-tracking-0.10.diff
     
    6460
    6561 * (Re)install Trac (see TracInstall):
    66 {{{
     62{{{#!sh
    6763./setup.py install
    6864}}}
    6965
    70 ==== Modifying trac.ini ====
    71 
    72 Add the following section to your {{{trac.ini}}} in your project's conf directory (see TracIni). This needs to be done for each project that you want to enable time tracking for:
    73 
    74 {{{
     66==== Modifying trac.ini
     67
     68Add the following section to your `trac.ini` in your project's conf directory, see TracIni. This needs to be done for each project that you want to enable time tracking for:
     69
     70{{{#!ini
    7571[ticket-custom]
    7672tt_estimated = text
     
    8480}}}
    8581
    86 ==== Adding the query (optional) ====
    87 
    88 Open your Trac project in a web browser and goto "View Tickets" -> "New Report" (you might need to grant REPORT_CREATE permission first). Enter a title like "Time Tracking" and the following query:
    89 
    90 ===== SQLite =====
     82==== Adding the query (optional)
     83
     84Open your Trac project in a web browser and goto "View Tickets" -> "New Report". You may have to grant the `REPORT_CREATE` permission first. Enter a title like "Time Tracking" and the following query:
     85
     86===== SQLite
    9187
    9288{{{
     
    110106}}}
    111107
    112 ===== Using Postgres with psycho =====
    113 
    114 Postgres has a few wrinkles and time intervals are not as hard to use.
     108===== Using Postgres with psycho
     109
     110Postgres has a few wrinkles and time intervals are not as hard to use:
    115111
    116112{{{
     
    134130}}}
    135131
    136 ===== MYSQL =====
     132===== MYSQL
    137133
    138134{{{
     
    157153}}}
    158154
    159 ==== Using a Subversion commit hook (optional) ====
     155==== Using a Subversion commit hook (optional)
    160156
    161157The {{{contrib/trac-post-commit-hook}}} script is a very convenient tool to interact with Trac's ticket system on commit. It allows to modify time tracking values and ticket state through special commit messages.
     
    193189'''Examples:'''
    194190
    195 {{{ 
     191{{{#!sh
    196192svn commit -m 'Added time tracking, refs #1 (spent 4h, rem 1h)'
    197193}}}
     
    199195This adds an entry to the Changelog of ticket #1, increases the time spent by 4 hours and sets the remaining time to 1 hour.
    200196
    201 {{{
     197{{{#!sh
    202198svn commit -m 'Added time tracking, closes #1 (1h), refs #2 (2h, rem 30m)'
    203199}}}
     
    205201This closes ticket #1, increases the time spent by 1 hour and decreases the remaining time by 1 hour. It adds an entry to the Changelog of ticket #2, increases the time spent by 2 hours and sets the remaining time to 30 minutes.
    206202
    207 === Screenshots ===
     203== Screenshots
    208204
    209205Click to enlarge.
    210206
    211 ==== Roadmap ====
     207=== Roadmap
    212208
    213209[[Image(trac-roadmap.png,400,display:block,margin-left:auto,margin-right:auto)]]
    214210
    215 ==== Milestone ====
     211=== Milestone
    216212
    217213[[Image(time-tracking-milestone.png,400,display:block,margin-left:auto,margin-right:auto)]]
    218214
    219 ==== Ticket Report ====
     215=== Ticket Report
    220216
    221217[[Image(trac-timetracking-report.png,400,display:block,margin-left:auto,margin-right:auto)]]
    222218
    223 === Changelog ===
     219== Changelog
    224220
    225221Patches for older version of Trac can be found at http://steffenpingel.de/files/patches/trac/.
     
    262258 * First release for Trac 0.9 stable branch
    263259
    264 === Known Issues ===
     260== Known Issues
    265261
    266262 * I couldn't see the second milestone bars so hacked the roadmap.cs to see them ... until I realized that using units (4h instead of just 4 ...) was the problem. All working now, very nice, many thanks.
     
    268264 * If your ticket doesn't have a time planned and/or time remaining set, and you spend time on a ticket, you end up with negative time values, which messes up time planning by having a net time spend of zero.
    269265
    270 
    271 ----
    272 
    273 == Trac 0.8 (extending the data model) ==
     266== Trac 0.8 (extending the data model)
    274267
    275268This patch is for Trac version 0.8.